<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:12:41 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-7875] Suspect locking cleanup in mdt_reint_unlink()</title>
                <link>https://jira.whamcloud.com/browse/LU-7875</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In mdt_reint_unlink we have suspect locking cleanup on error:&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;        rc = mdt_reint_object_lock(info, mc, child_lh, lock_ibits,
                                   cos_incompat);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc != 0)
                GOTO(unlock_child, rc);
...
unlock_child:
        mdt_unlock_slaves(info, mc, MDS_INODELOCK_UPDATE, s0_lh, s0_obj, einfo,
                          rc);
        mdt_object_unlock(info, mc, child_lh, rc);
unlock_parent:
        mdt_object_unlock(info, mp, parent_lh, rc);
put_child:
        mdt_object_put(info-&amp;gt;mti_env, mc);
put_parent:
        mdt_object_put(info-&amp;gt;mti_env, mp);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So it looks like we failed a child lock and then jus jump to unlock it anyway?&lt;br/&gt;
need to make that goto to unlock_parent?&lt;br/&gt;
Also need to check if the below lock_slaves call to unlock slaves would be fine too. Not even sure why the unlock order is reversed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="35319">LU-7875</key>
            <summary>Suspect locking cleanup in mdt_reint_unlink()</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="6">Not a Bug</resolution>
                                        <assignee username="laisiyao">Lai Siyao</assignee>
                                    <reporter username="green">Oleg Drokin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Mar 2016 16:13:59 +0000</created>
                <updated>Sun, 14 Jan 2018 03:11:09 +0000</updated>
                            <resolved>Sun, 14 Jan 2018 03:11:09 +0000</resolved>
                                                    <fixVersion>Lustre 2.11.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="216340" author="pjones" created="Thu, 14 Dec 2017 18:33:08 +0000"  >&lt;p&gt;Lai&lt;/p&gt;

&lt;p&gt;Can you please look into this?&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="217348" author="laisiyao" created="Wed, 3 Jan 2018 02:31:44 +0000"  >&lt;p&gt;This is not a bug IMO, because unlink locks in below order:&lt;br/&gt;
1. lock parent UPDATE bit.&lt;br/&gt;
2. if parent is remote, lock child LOOKUP bit on remote mdt, then lock child UPDATE bit on current mdt,&lt;br/&gt;
    else lock child LOOKUP | UPDATE bits on current mdt.&lt;br/&gt;
3. if child is striped dir, lock all its slave stripes.&lt;/p&gt;

&lt;p&gt;So we can see if parent is remote, child inodebits are locked on different MDTs, so if the second lock fails, it needs to unlock the first lock.&lt;/p&gt;

&lt;p&gt;And slave locks should be unlocked first, mdt_unlock_slaves() is safe to call at any time, because if no slave locks taken, nothing will be done.&lt;/p&gt;

&lt;p&gt;It&apos;s a bit confusing that in step 2, if parent is remote, mdt_remote_object_lock() is called on parent object, but  actually it&apos;s used to find the parent MDT, the real locked resource is child.&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|hzy4db:</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>