<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:09:16 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-14383] race between lookup and migrate</title>
                <link>https://jira.whamcloud.com/browse/LU-14383</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The following race between mkdir and migrate may end with failure of mkdir:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;       mkdir $DIR1/$tdir

       mkdir $DIR2/$tdir/dir2 &amp;amp;
       $LFS migrate -m 1 $DIR1/$tdir
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Please confirm whether it is expected behavior has to be fixed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="62580">LU-14383</key>
            <summary>race between lookup and migrate</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="6">Not a Bug</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="vsaveliev">Vladimir Saveliev</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Jan 2021 12:24:57 +0000</created>
                <updated>Wed, 12 Jan 2022 13:33:17 +0000</updated>
                            <resolved>Wed, 12 Jan 2022 13:33:17 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="290695" author="gerrit" created="Fri, 29 Jan 2021 12:28:46 +0000"  >&lt;p&gt;Vladimir Saveliev (c17830@cray.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/41364&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/41364&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14383&quot; title=&quot;race between lookup and migrate&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14383&quot;&gt;&lt;del&gt;LU-14383&lt;/del&gt;&lt;/a&gt; tests: lookup and migrate race&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: e9a235febb1ab331929ef57c84e95cbe479596e1&lt;/p&gt;</comment>
                            <comment id="291328" author="laisiyao" created="Fri, 5 Feb 2021 08:23:11 +0000"  >&lt;p&gt;This looks to be expected in current implementation: &quot;mkdir $DIR2/$tdir/dir2&quot; tried to create &quot;dir2&quot; under current layout, however if server found the layout is changed, it may return error. To solve this race, client needs to refresh layout of $tdir and try again.&lt;/p&gt;</comment>
                            <comment id="291508" author="vsaveliev" created="Tue, 9 Feb 2021 09:44:26 +0000"  >&lt;blockquote&gt;&lt;p&gt;This looks to be expected in current implementation: &quot;mkdir $DIR2/$tdir/dir2&quot; tried to create &quot;dir2&quot; under current layout, however if server found the layout is changed, it may return error.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;ok&lt;/p&gt;

&lt;p&gt;Btw, the same applies to stat:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
@@ -4631,12 +4631,13 @@ test_80c() {
        [ $MDSCOUNT -lt 2 ] &amp;amp;&amp;amp; skip &lt;span class=&quot;code-quote&quot;&gt;&quot;needs &amp;gt;= 2 MDTs&quot;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt;

        mkdir $DIR1/$tdir
+       touch $DIR1/$tdir/file
        #define OBD_FAIL_MDS_OBJECT_LOCK_DELAY  0x16b
        do_facet mds1 $LCTL set_param fail_loc=0x8000016b
-       mkdir $DIR2/$tdir/dir2 &amp;amp;
-       MKDIRPID=$!
+       stat $DIR2/$tdir/file &amp;amp;
+       STATPID=$!
        $LFS migrate -m 1 $DIR1/$tdir
-       wait $MKDIRPID
+       wait $STATPID
        [ $? -eq 0 ] || error &lt;span class=&quot;code-quote&quot;&gt;&quot;stat failed&quot;&lt;/span&gt;
 }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This results in:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;== sanityn test 80c: Lookup and migrate race ========================================================= 18:04:30 (1612796670)
fail_loc=0x8000016b
stat: cannot stat &apos;/mnt/lustre2/d80c.sanityn/file&apos;: No such file or directory
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If this is ok as well, then sanityn.sh:test_80b() should not break its &quot;accessing the migrating directory&quot; loop with:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
                stat $migrate_dir2/file5 &amp;gt; /dev/&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; || {
                        echo &lt;span class=&quot;code-quote&quot;&gt;&quot;stat file5 fails&quot;&lt;/span&gt;
			&lt;span class=&quot;code-keyword&quot;&gt;break&lt;/span&gt;
                }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;blockquote&gt;&lt;p&gt;To solve this race, client needs to refresh layout of $tdir and try again.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;WIth -ENOENT clients are not able to decide whether they are to try again. Would it be possible to return -EAGAIN in case of race with migrate?&lt;/p&gt;</comment>
                            <comment id="291510" author="laisiyao" created="Tue, 9 Feb 2021 11:21:17 +0000"  >&lt;p&gt;This issue should be fixed by FID map, which is tracked under &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7607&quot; title=&quot;Preserve inode number after MDT migration &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7607&quot;&gt;LU-7607&lt;/a&gt;. The patch is on &lt;a href=&quot;https://review.whamcloud.com/#/c/38233/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/#/c/38233/&lt;/a&gt;, but I don&apos;t have time to update it recently.&lt;/p&gt;</comment>
                    </comments>
                    <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|i01ks7:</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>