<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:51:37 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-5453] mdt_attr_set() uses EX lock for slave 0, PW for master and other slaves</title>
                <link>https://jira.whamcloud.com/browse/LU-5453</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In the striped directory case of mdt_attr_set() we use a EX lock on slave 0 while we use a PW lock on the master inode and the other slaves:&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;mdt_attr_set()
	__u64 lockpart = MDS_INODELOCK_UPDATE;

	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (ma-&amp;gt;ma_attr.la_valid &amp;amp; (LA_MODE|LA_UID|LA_GID))
		lockpart |= MDS_INODELOCK_LOOKUP | MDS_INODELOCK_PERM;

        lh = &amp;amp;info-&amp;gt;mti_lh[MDT_LH_PARENT];
	mdt_lock_reg_init(lh, LCK_PW);

        rc = mdt_object_lock(info, mo, lh, lockpart, MDT_LOCAL_LOCK);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc != 0)
        	RETURN(rc);

        s0_lh = &amp;amp;info-&amp;gt;mti_lh[MDT_LH_LOCAL];
        mdt_lock_reg_init(s0_lh, LCK_EX);
        rc = mdt_lock_slaves(info, mo, LCK_PW, lockpart, s0_lh, &amp;amp;s0_obj, einfo);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc != 0)
        	GOTO(out_unlock, rc);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Because the locking order is master, slave0, then other slaves this seems prone to causing deadlocks.&lt;/p&gt;</description>
                <environment></environment>
        <key id="25866">LU-5453</key>
            <summary>mdt_attr_set() uses EX lock for slave 0, PW for master and other slaves</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="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>dne2</label>
                            <label>mdt</label>
                    </labels>
                <created>Tue, 5 Aug 2014 14:48:18 +0000</created>
                <updated>Mon, 24 Apr 2017 06:13:44 +0000</updated>
                            <resolved>Thu, 26 Feb 2015 22:34:00 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="90998" author="jhammond" created="Wed, 6 Aug 2014 19:46:18 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/11353&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11353&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="91067" author="green" created="Thu, 7 Aug 2014 17:24:26 +0000"  >&lt;p&gt;I think for all intents and purposes EX and PW locs are the same, everything else conflicts with them? So it&apos;s a pure cosmetic issue I would think&lt;/p&gt;</comment>
                            <comment id="91085" author="jhammond" created="Thu, 7 Aug 2014 19:01:38 +0000"  >&lt;p&gt;LCK_CR?&lt;/p&gt;</comment>
                            <comment id="91318" author="di.wang" created="Mon, 11 Aug 2014 18:36:33 +0000"  >&lt;p&gt;I agree all of slave lock mode should keep consistency with the master. Could you please explain what deadlock issue you concerned here? The lock order will always be master, then slave (from 0 to n), and each slave can only belong to 1 master.&lt;/p&gt;</comment>
                            <comment id="91322" author="jhammond" created="Mon, 11 Aug 2014 18:59:20 +0000"  >&lt;p&gt;&amp;gt; Could you please explain what deadlock issue you concerned here?&lt;/p&gt;

&lt;p&gt;Nothing concrete. I just meant that even with a defined order for objects the ordering of lock modes (weak mode, strong mode, weak mode) seems like trouble.&lt;/p&gt;</comment>
                            <comment id="108180" author="adilger" created="Thu, 26 Feb 2015 22:32:18 +0000"  >&lt;p&gt;Di, is this still an issue with the new striped directory layout where the master object has separate shard objects 0..N?&lt;/p&gt;</comment>
                            <comment id="108181" author="adilger" created="Thu, 26 Feb 2015 22:34:00 +0000"  >&lt;p&gt;It looks like this was fixed as part of &lt;a href=&quot;http://review.whamcloud.com/11353&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11353&lt;/a&gt; anyway, which landed in 2.7.0.&lt;/p&gt;</comment>
                            <comment id="193178" author="gerrit" created="Mon, 24 Apr 2017 06:13:44 +0000"  >&lt;p&gt;Wang Shilong (wshilong@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/26790&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/26790&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5453&quot; title=&quot;mdt_attr_set() uses EX lock for slave 0, PW for master and other slaves&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5453&quot;&gt;&lt;del&gt;LU-5453&lt;/del&gt;&lt;/a&gt; mdt: mdt_reint_setattr() and mdt_attr_set() fixes&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_5&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 139d70f1587e9058c76f1cbcbd268e8d6d9c6faf&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|hzwsxz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15176</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>