<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:14:34 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-8092] racy striping &amp; default striping cache in LOD</title>
                <link>https://jira.whamcloud.com/browse/LU-8092</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;striping &amp;amp; default striping cache in LOD layer looks racy:&lt;/p&gt;

&lt;p&gt;1. striping cache&lt;/p&gt;

&lt;p&gt;lod_load_striping() is used for loading striping for regular file (LOV) or directory (LMA), caller usually calls lod_load_striping() to load striping into cache first (see lod_object), then performs following operations which relies on the cached striping. However, there isn&apos;t a mechanism in LOD to prevent the cache from being freed before the operations done. External means are used to avoid such race in current Lustre:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;For regular file, all the operations (create, setstripe, destroy, chown, lfsck) requires striping information (load striping cache &amp;amp; free striping cache) will hold LDLM ibits lock, that guarantees no concurrent striping free on the object;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;For directory, the striping information (LMV) is immutable in most cases, so there won&apos;t be a concurrent striping free (except LFSCK, so it&apos;s not 100% race free);&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I think we&apos;d reorgnize the code to avoid such kind of race in LOD but not rely on external means.&lt;/p&gt;


&lt;p&gt;2. default striping cache&lt;/p&gt;

&lt;p&gt;In lod_ah_init(), default striping (both default LOV and LMV) in parent directory will be loaded into LOD cache (see lod_object), then it&apos;ll be propagated to the child file/directory being created (child&apos;s lod_object). Because multiple lod_ah_init() against same parent could be called in parallel, and the default striping in parent could be changed at the same time, we probably need to protect the whole lod_ah_init() with dt_read/write_lock(parent).&lt;/p&gt;</description>
                <environment></environment>
        <key id="36540">LU-8092</key>
            <summary>racy striping &amp; default striping cache in LOD</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="niu">Niu Yawei</reporter>
                        <labels>
                    </labels>
                <created>Tue, 3 May 2016 13:49:54 +0000</created>
                <updated>Wed, 13 Oct 2021 02:35:04 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="150832" author="bzzz" created="Tue, 3 May 2016 13:57:27 +0000"  >&lt;p&gt;Like I mentioned few times it makes sense to look at the different option:&lt;br/&gt;
1) do not cache in LOD&lt;br/&gt;
2) at declare do not create striping in the object, but instead create a temporary structure in LOD&apos;s thandle and instantiate that at execution.&lt;/p&gt;</comment>
                            <comment id="150833" author="niu" created="Tue, 3 May 2016 13:58:07 +0000"  >&lt;blockquote&gt;
&lt;p&gt;OSD can cache LOV EA so that getting default from OSD on every creation doesn&apos;t imply performance penalty. all the locking needed to protect EA access in OSD is already in place, so LOD wouldn&apos;t need anything. plus this would solve cache invalidation issue we have with slave directories.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Alex, you mean for the second problem (default striping cache), in lod_ah_init(), we can read and parse the default LOV/LMA EA cached in OSD layer into a per thread temporary buffer in LOD, then use the buffer without locking?&lt;/p&gt;</comment>
                            <comment id="150834" author="bzzz" created="Tue, 3 May 2016 14:06:38 +0000"  >&lt;p&gt;yes, that&apos;s correct description.&lt;br/&gt;
&lt;em&gt;probably&lt;/em&gt; this approach can be taken for the first problem as well - this would help to avoid another problem where one LOD object pins same (or even larger) number of OSP objects. &lt;/p&gt;</comment>
                            <comment id="150951" author="niu" created="Wed, 4 May 2016 09:43:47 +0000"  >&lt;p&gt;The second problem has been addressed in the &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7660&quot; title=&quot;FS default striping settings only honored on MDT 0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7660&quot;&gt;&lt;del&gt;LU-7660&lt;/del&gt;&lt;/a&gt; : &lt;a href=&quot;http://review.whamcloud.com/#/c/19041&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/19041&lt;/a&gt; (by the way Alex suggested), I agree that the same approach can be applied to fix the first problem, but that requires a lot more code changes, let&apos;s fix it later on the code base of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7660&quot; title=&quot;FS default striping settings only honored on MDT 0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7660&quot;&gt;&lt;del&gt;LU-7660&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="34094">LU-7660</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzya5r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>