<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:58:14 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-6211] getxattr() for {lustre,trusted}.lov on HSM released file returns stripe count 0</title>
                <link>https://jira.whamcloud.com/browse/LU-6211</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When getxattr() is called to retrieve the lustre.lov or trusted.lov xattr of a regular file the returned value is synthesized from the LSM attached to that file. When the file is released that LSM will have a stripe count of 0.&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;# lfs setstripe -c2 f0
# lfs getstripe f0
f0
lmm_stripe_count:   2
lmm_stripe_size:    1048576
lmm_pattern:        1
lmm_layout_gen:     0
lmm_stripe_offset:  0
        obdidx          objid           objid           group
        0               3               0x3             0
        1               3               0x3             0

# sys_getxattr --raw f0 lustre.lov | hexdump -C
00000000  d0 0b d1 0b 01 00 00 00  04 00 00 00 00 00 00 00  |................|
00000010  00 04 00 00 02 00 00 00  00 00 10 00 02 00 00 00  |................|
00000020  03 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  03 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 01 00 00 00  |................|
00000050
# sys_getxattr --raw f0 trusted.lov | hexdump -C
00000000  d0 0b d1 0b 01 00 00 00  04 00 00 00 00 00 00 00  |................|
00000010  00 04 00 00 02 00 00 00  00 00 10 00 02 00 00 00  |................|
00000020  03 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  03 00 00 00 00 00 00 00  |................|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 01 00 00 00  |................|
00000050
# lfs hsm_archive f0
# lfs hsm_release f0
# lfs hsm_state f0
f0: (0x0000000d) released exists archived, archive_id:1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;lfs getstripe returns the correct answer as it does not use the LSM but instead does a IOC_MDC_GETFILESTRIPE ioctl on the parent directory which calls ll_lov_getstripe_ea_info() and sends a MDS_GETATTR_NAME request.&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;# lfs getstripe f0
f0
lmm_stripe_count:   2
lmm_stripe_size:    1048576
lmm_pattern:        80000001
lmm_layout_gen:     1
lmm_stripe_offset:  0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;getxattr() returns the wrong answer as it uses that attached LSM:&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;q:lustre# sys_getxattr -r f0 lustre.lov | hexdump -C
00000000  d0 0b d1 0b 01 00 00 80  04 00 00 00 00 00 00 00  |................|
00000010  00 04 00 00 02 00 00 00  00 00 10 00 00 00 00 00  |................|
00000020
q:lustre# sys_getxattr -r f0 trusted.lov | hexdump -C
00000000  d0 0b d1 0b 01 00 00 80  04 00 00 00 00 00 00 00  |................|
00000010  00 04 00 00 02 00 00 00  00 00 10 00 00 00 00 00  |................|
00000020

          magic------ pattern----  oi---------------------
00000000  d0 0b d1 0b 01 00 00 80  04 00 00 00 00 00 00 00  |................|
          -----------------------  size------- count gen--
00000010  00 04 00 00 02 00 00 00  00 00 10 00 00 00 00 00  |................|
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When the LL_IOC_LOV_GETSTRIPE ioctl is done on a regular file we will also get a stripe count of 0 on a released file. But neither llapi nor lfs will use LL_IOC_LOV_GETSTRIPE on a regular file.&lt;/p&gt;

&lt;p&gt;Note that this code was modified recently as part of CLIO simplification (see &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5823&quot; title=&quot;Replace some obsolete obd operations with CLIO ioctl interface&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5823&quot;&gt;&lt;del&gt;LU-5823&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;http://review.whamcloud.com/12452&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12452&lt;/a&gt;) but the same defect existed before that commit.&lt;/p&gt;</description>
                <environment></environment>
        <key id="28571">LU-6211</key>
            <summary>getxattr() for {lustre,trusted}.lov on HSM released file returns stripe count 0</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="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>hsm</label>
                            <label>lov</label>
                            <label>xattr</label>
                    </labels>
                <created>Thu, 5 Feb 2015 16:05:51 +0000</created>
                <updated>Sun, 30 Jan 2022 10:52:15 +0000</updated>
                                            <version>Lustre 2.7.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="105882" author="adilger" created="Thu, 5 Feb 2015 18:17:56 +0000"  >&lt;p&gt;I agree that this is inconsistent behaviour and should be fixed, though I couldn&apos;t say which result is more correct. Does this cause any specific problems that would warrant it being fixed more urgently, or is this just a quirk that can be fixed at some later time?&lt;/p&gt;</comment>
                            <comment id="248675" author="cfaber" created="Fri, 7 Jun 2019 16:58:08 +0000"  >&lt;p&gt;This is an oldie but a goodie. I would say this probably should be a little more urgent, recently we suspect we&apos;ve hit this behavior, resulting in problems with a site&apos;s archive solution which attempts to store the stripe data with the archive, so on restore it can be recreated with the same striping configuration.&#160; It&apos;s not a show stopper, but definitely a problem and others are likely experiencing it though they may not realize it.&lt;/p&gt;</comment>
                            <comment id="248739" author="adilger" created="Fri, 7 Jun 2019 19:02:53 +0000"  >&lt;p&gt;Wouldn&apos;t it make sense for the HSM to archive the layout xattr &lt;b&gt;before&lt;/b&gt; the file is released?  That allows it to be re-used in restore, and also helps recovery if the file is lost/deleted. &lt;/p&gt;</comment>
                            <comment id="248749" author="cfaber" created="Fri, 7 Jun 2019 21:27:15 +0000"  >&lt;p&gt;Yes, this does make great sense, however we&apos;re also chasing an issue were, apparently in some cases xattr read fails silently before the file is released =)&lt;/p&gt;</comment>
                            <comment id="248760" author="adilger" created="Fri, 7 Jun 2019 22:28:39 +0000"  >&lt;p&gt;On the flip side, something like the &quot;&lt;tt&gt;lfs_migrate -A&lt;/tt&gt;&quot; code to auto-select the layout of the file based on the file size is pretty reasonable.  PFL and such are good when you don&apos;t know the file size, but if you know the size in advance (e.g. restoring from HSM) then it is possible to make a better choice of the stripe count than when the file was first created.&lt;/p&gt;

&lt;p&gt;Not saying this bug shouldn&apos;t be fixed, just giving some options.&lt;/p&gt;</comment>
                            <comment id="248762" author="cfaber" created="Fri, 7 Jun 2019 22:47:29 +0000"  >&lt;p&gt;No arguments here &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="28572">LU-6212</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|hzx5qf:</customfieldvalue>

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