<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:08:26 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-7383]  migrate failed: Device or resource busy (-16) after &quot;ls&quot; dir</title>
                <link>https://jira.whamcloud.com/browse/LU-7383</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;according to the migrate dir test plan, here is what I do:&lt;/p&gt;

&lt;p&gt;1. Setup lustre with 4 MDTs, 4 OSTs and 1 client.&lt;br/&gt;
2. Create 5 directories /mnt/lustre/migrate{1..5} and 100 files under each directory on MDT0&lt;br/&gt;
3. Create another directory /mnt/lustre/other_dir also on MDT0,  then create some symbol_link/link files, which should be linked to files under /mnt/lustre/migrate{1..5}&lt;br/&gt;
4. ls /mnt/lustre/other_dir&lt;br/&gt;
5. Migrate /mnt/lustre/migrate2 by&lt;br/&gt;
    lfs migrate -m 1 /mnt/lustre/migrate2&lt;/p&gt;

&lt;p&gt;Got following failure:&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;[root@onyx-27 lustre]# lfs migrate -m 1 /mnt/lustre/migrate2
/mnt/lustre/migrate2/1 migrate failed: Device or resource busy (-16)
error: migrate: migrate file &apos;/mnt/lustre/migrate2&apos; failed
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After talked with Di,  he said there are two ways to bypass this problem:&lt;br/&gt;
either:  touch another file under other_dir&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;[root@onyx-27 lustre]# touch other_dir/a
[root@onyx-27 lustre]# lfs migrate -m 1 /mnt/lustre/migrate2
[root@onyx-27 lustre]#
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or umount and mount the client&lt;/p&gt;</description>
                <environment>client and server: lustre-master build #3226 RHEL7</environment>
        <key id="32995">LU-7383</key>
            <summary> migrate failed: Device or resource busy (-16) after &quot;ls&quot; dir</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="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="di.wang">Di Wang</assignee>
                                    <reporter username="sarah">Sarah Liu</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Nov 2015 06:10:12 +0000</created>
                <updated>Fri, 2 Feb 2018 09:17:35 +0000</updated>
                            <resolved>Wed, 9 Dec 2015 04:50:27 +0000</resolved>
                                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="132639" author="di.wang" created="Wed, 4 Nov 2015 17:39:15 +0000"  >&lt;p&gt;The reason here is that the lock of the migrating object is being cached on the client side by &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;ls /mnt/lustre/other_dir
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And during migration, to avoid deadlock, we use mdt_object_lock_try to enqueue all of objects in linkea for multiple link file, which will return -EBUSY in such case.&lt;/p&gt;

&lt;p&gt;So there are two options&lt;/p&gt;

&lt;p&gt;1. If lock_try fails, then enqueue the lock with normal mdt_object_lock, but it will cause deadlock especially you add migration inside racer. Sigh, I wish we had a way to order the locks somehow.&lt;/p&gt;

&lt;p&gt;2. Leave it as it is now, because the lock of the migrating object is cached on the client side, and it is indeed busy for migration, (though it is a bit tricky). Note: this only happens for multiple link file.  Normal file should be ok.&lt;/p&gt;

</comment>
                            <comment id="132654" author="green" created="Wed, 4 Nov 2015 19:21:46 +0000"  >&lt;p&gt;you probably can have a EBUSY handler inside of the lfs migrate to attempt to invalidate the lock once and repeat the operation in the hopes that woul work before returning an error.&lt;/p&gt;</comment>
                            <comment id="132708" author="gerrit" created="Thu, 5 Nov 2015 05:20:22 +0000"  >&lt;p&gt;wangdi (di.wang@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/17048&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/17048&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7383&quot; title=&quot; migrate failed: Device or resource busy (-16) after &amp;quot;ls&amp;quot; dir&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7383&quot;&gt;&lt;del&gt;LU-7383&lt;/del&gt;&lt;/a&gt; mdt: retry for busy lock during migration&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 51bffb2cbe7df7f76a7b66293f15c8566c86feaf&lt;/p&gt;</comment>
                            <comment id="135615" author="gerrit" created="Wed, 9 Dec 2015 02:24:22 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/17048/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/17048/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7383&quot; title=&quot; migrate failed: Device or resource busy (-16) after &amp;quot;ls&amp;quot; dir&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7383&quot;&gt;&lt;del&gt;LU-7383&lt;/del&gt;&lt;/a&gt; mdt: retry for busy lock during migration&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 5cb0a721aea53ffc8230190c3a0b35e71a47d35b&lt;/p&gt;</comment>
                            <comment id="135629" author="pjones" created="Wed, 9 Dec 2015 04:50:27 +0000"  >&lt;p&gt;Landed for 2.8&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="50500">LU-10597</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|hzxs7r:</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>