<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:14:03 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-8034] HSM: Symlink in shadow directory links to a wrong path when archiving files managed by MDT1</title>
                <link>https://jira.whamcloud.com/browse/LU-8034</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Symlink in shadow directory links to a wrong path when archiving files managed by MDT1(right path when by MDT0).&lt;/p&gt;

&lt;p&gt;To reproduce:&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;[Clinet]
# mkdir /lustre/mdt0_dir
# lfs mkdir -i 1 /lustre/mdt1_dir/
# echo aaa &amp;gt; /lustre/mdt0_dir/file
# echo aaa &amp;gt; /lustre/mdt1_dir/file
# lfs hsm_archive /lustre/mdt0_dir/file
# lfs hsm_archive /lustre/mdt1_dir/file
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;[Agent]
# ls -l /mnt/hsm-arc/shadow/mdt0_dir/file
lrwxrwxrwx 1 root root 55 Apr 15 16:04 /mnt/hsm-arc/shadow/mdt0_dir/file -&amp;gt; ../../0006/0000/0403/0000/0002/0000/0x200000403:0x6:0x0
# ls -l /mnt/hsm-arc/shadow/mdt1_dir/file
lrwxrwxrwx 1 root root 58 Apr 15 16:04 /mnt/hsm-arc/shadow/mdt1_dir/file -&amp;gt; ../../../0002/0000/0403/4000/0002/0000/0x240000403:0x2:0x0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is because lhsmtool_posix counts the number of &quot;/&quot; to figure out how many parent directories to symlink back.&lt;br/&gt;
But, llapi_fid2path() adds the pathname to an extra &quot;/&quot; in the case of files managed by MDT1.&lt;br/&gt;
So, the symlink links to a wrong path&lt;br/&gt;
(This may be a llapi_fid2path&apos;s bug).&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;                ptr = opt.o_hsm_root;
                while (*ptr)
                        (*ptr++ == &apos;/&apos;) ? depth-- : 0;

                rc = llapi_fid2path(opt.o_mnt, buf, src + strlen(src),
                                    sizeof(src) - strlen(src), &amp;amp;recno, &amp;amp;linkno);


                /* Figure out how many parent dirs to symlink back */
                ptr = src;
                while (*ptr)
                        (*ptr++ == &apos;/&apos;) ? depth++ : 0;
                sprintf(buf, &quot;..&quot;);
                while (--depth &amp;gt; 1)
                        strcat(buf, &quot;/..&quot;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;[Clinet]
# lfs fid2path /lustre/ 0x200000403:0x6:0x0
/lustre/mdt0_dir/file
# lfs fid2path /lustre/ 0x240000403:0x2:0x0
/lustre//mdt1_dir/file
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="36193">LU-8034</key>
            <summary>HSM: Symlink in shadow directory links to a wrong path when archiving files managed by MDT1</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="3">Duplicate</resolution>
                                        <assignee username="rread">Robert Read</assignee>
                                    <reporter username="takamura">Tatsushi Takamura</reporter>
                        <labels>
                            <label>HSM</label>
                    </labels>
                <created>Mon, 18 Apr 2016 06:16:36 +0000</created>
                <updated>Sat, 23 Jul 2016 05:16:51 +0000</updated>
                            <resolved>Sat, 23 Jul 2016 05:16:51 +0000</resolved>
                                    <version>Lustre 2.8.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="149310" author="rread" created="Mon, 18 Apr 2016 18:08:48 +0000"  >&lt;p&gt;Since llapi_fid2path returns relative paths it probably shouldn&apos;t be adding any leading &apos;/&apos; anyway. &lt;/p&gt;</comment>
                            <comment id="149313" author="jhammond" created="Mon, 18 Apr 2016 18:26:53 +0000"  >&lt;p&gt;This issue exists in 2.8.0 but not in 2.9.0. Not sure why exactly.&lt;/p&gt;</comment>
                            <comment id="150456" author="takamura" created="Thu, 28 Apr 2016 05:48:13 +0000"  >&lt;p&gt;I have confirmed that this issue is resolved applying the patch of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-28&quot; title=&quot;Ability for client to mount subdirectories of a Lustre filesystem&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-28&quot;&gt;&lt;del&gt;LU-28&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;</comment>
                            <comment id="159663" author="pjones" created="Sat, 23 Jul 2016 05:16:51 +0000"  >&lt;p&gt;Thanks for confirming&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_10070" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Project</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10040"><![CDATA[HSM]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzy8bb:</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>