<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:20:50 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-8821] double find in mdt_path_current()</title>
                <link>https://jira.whamcloud.com/browse/LU-8821</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In &lt;tt&gt;mdt_path_current()&lt;/tt&gt; we find an object while holding a reference to it causing a potential deadlock in &lt;tt&gt;lu_object_find_at()&lt;/tt&gt;:&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;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; mdt_path_current(struct mdt_thread_info *info,
                            struct mdt_object *obj,
                            struct getinfo_fid2path *fp)
{
        struct mdt_device       *mdt = info-&amp;gt;mti_mdt;
        struct mdt_object       *mdt_obj;
        struct link_ea_header   *leh;
        struct link_ea_entry    *lee;
        struct lu_name          *tmpname = &amp;amp;info-&amp;gt;mti_name;
        struct lu_fid           *tmpfid = &amp;amp;info-&amp;gt;mti_tmp_fid1;
        struct lu_buf           *buf = &amp;amp;info-&amp;gt;mti_big_buf;
        &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt;                    *ptr;
        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;                     reclen;
        struct linkea_data      ldata = { NULL };
        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;                     rc = 0;
        bool                    first = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
        ENTRY;

        /* temp buffer &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; path element, the buffer will be &lt;span class=&quot;code-keyword&quot;&gt;finally&lt;/span&gt; freed
         * in mdt_thread_info_fini */
        buf = lu_buf_check_and_alloc(buf, PATH_MAX);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (buf-&amp;gt;lb_buf == NULL)
                RETURN(-ENOMEM);

        ldata.ld_buf = buf;
        ptr = fp-&amp;gt;gf_path + fp-&amp;gt;gf_pathlen - 1;
        *ptr = 0;
        --ptr;
        *tmpfid = fp-&amp;gt;gf_fid = *mdt_object_fid(obj);

        /* root FID only exists on MDT0, and fid2path should also ends at MDT0,
         * so checking root_fid can only happen on MDT0. */
        &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; (!lu_fid_eq(&amp;amp;mdt-&amp;gt;mdt_md_root_fid, &amp;amp;fp-&amp;gt;gf_fid)) {
                struct lu_buf           lmv_buf;

                mdt_obj = mdt_object_find(info-&amp;gt;mti_env, mdt, tmpfid);
                ...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;One way to see a hang from this is to enable HSM and do:&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;# cd /mnt/lustre
# while true; do
    echo XXX &amp;gt; f0
    lfs hsm_archive f0
    sys_unlink f0
done
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note that in the archive path the CT uses the fid2path ioctl for debug messages. In restore it uses the fid2path ioctl to get the parent directory of the file to be restored when creating the volatile file.&lt;/p&gt;</description>
                <environment></environment>
        <key id="41466">LU-8821</key>
            <summary>double find in mdt_path_current()</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>hsm</label>
                            <label>mdt</label>
                    </labels>
                <created>Thu, 10 Nov 2016 16:32:20 +0000</created>
                <updated>Sat, 23 Mar 2019 14:49:03 +0000</updated>
                            <resolved>Tue, 24 Jan 2017 14:32:07 +0000</resolved>
                                                    <fixVersion>Lustre 2.10.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="173133" author="gerrit" created="Thu, 10 Nov 2016 16:35:15 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/23701&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/23701&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8821&quot; title=&quot;double find in mdt_path_current()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8821&quot;&gt;&lt;del&gt;LU-8821&lt;/del&gt;&lt;/a&gt; mdt: avoid double find in mdt_path_current()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 302192da25bc9e53735a5f81895af862eba78ddf&lt;/p&gt;</comment>
                            <comment id="173147" author="rread" created="Thu, 10 Nov 2016 18:06:37 +0000"  >&lt;p&gt;FWIW, Lemur doesn&apos;t use fid2path in archive path (we just print FIDs in debug messages), and it is liblustreapi_hsm.c that is using fid2path in restore path, so out of our control currently.&lt;/p&gt;

&lt;p&gt;I wonder if we can avoid the fid2path in restore  by using the parent fid from the lsm xattr and then openat() to create the recovery file.&lt;/p&gt;</comment>
                            <comment id="181855" author="gerrit" created="Tue, 24 Jan 2017 05:23:28 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/23701/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/23701/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8821&quot; title=&quot;double find in mdt_path_current()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8821&quot;&gt;&lt;del&gt;LU-8821&lt;/del&gt;&lt;/a&gt; mdt: avoid double find in mdt_path_current()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: c6383473e74262eaf8f822dcb6b28b22b130f364&lt;/p&gt;</comment>
                            <comment id="181901" author="pjones" created="Tue, 24 Jan 2017 14:32:07 +0000"  >&lt;p&gt;Landed for 2.10&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="54891">LU-11970</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </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|hzyv6v:</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>