<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:41:00 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-11107] getxattr() returns 0 length values for nonexistent xattrs (with xattr_cache=0)</title>
                <link>https://jira.whamcloud.com/browse/LU-11107</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When the xattr cache is disabled (or when we bypass it as in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11074&quot; title=&quot;Invalid argument reading file caps&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11074&quot;&gt;&lt;del&gt;LU-11074&lt;/del&gt;&lt;/a&gt;), &lt;tt&gt;getxattr()&lt;/tt&gt; will return a zero length value for any nonexistent attribute:&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;o:~# lctl set_param llite.*.xattr_cache=0
llite.lustre-ffff8c4ac8a60000.xattr_cache=0
o:~# cd /mnt/lustre
o:lustre# touch f0
o:lustre# getfattr -d -m- f0
# file: f0
lustre.lov=0s0AvRCwEAAAABAAAAAAAAAAEEAAACAAAAAAAQAAEAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
trusted.link=0s3/HqEQEAAAAsAAAAAAAAAAAAAAAAAAAAABQAAAACAAAABwAAAAEAAAAAZjA=
trusted.lma=0sAAAAAAAAAAABBAAAAgAAAAEAAAAAAAAA
trusted.lov=0s0AvRCwEAAAABAAAAAAAAAAEEAAACAAAAAAAQAAEAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
trusted.version=0sAQAAAAEAAAA=

o:lustre# getfattr -d -n user.blah f0
# file: f0
user.blah

o:lustre# strace getfattr -d -n user.blah f0
...
lstat(&quot;f0&quot;, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
getxattr(&quot;f0&quot;, &quot;user.blah&quot;, NULL, 0)    = 0
getxattr(&quot;f0&quot;, &quot;user.blah&quot;, NULL, 0)    = 0
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;After reenabling the xattr cache &lt;tt&gt;getxattr()&lt;/tt&gt; works as expected:&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;o:lustre# lctl set_param llite.*.xattr_cache=1
llite.lustre-ffff8c4ac8a60000.xattr_cache=1
o:lustre# getfattr -d -n user.blah f0
f0: user.blah: No such attribute
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is because in &lt;tt&gt;mdt_getxattr_pack_reply()&lt;/tt&gt; if the xattr doesn&apos;t exist then we return 0. And in &lt;tt&gt;mdt_getxattr()&lt;/tt&gt; we have the following:&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;
        easize = mdt_getxattr_pack_reply(info);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (easize &amp;lt; 0)
                GOTO(out, rc = err_serious(easize));

        repbody = req_capsule_server_get(info-&amp;gt;mti_pill, &amp;amp;RMF_MDT_BODY);
        LASSERT(repbody != NULL);

        &lt;span class=&quot;code-comment&quot;&gt;/* No need further getxattr. */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (easize == 0 || reqbody-&amp;gt;mbo_eadatasize == 0)
                GOTO(out, rc = easize);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="52612">LU-11107</key>
            <summary>getxattr() returns 0 length values for nonexistent xattrs (with xattr_cache=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="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>xattr</label>
                    </labels>
                <created>Fri, 29 Jun 2018 17:10:26 +0000</created>
                <updated>Fri, 3 Aug 2018 20:38:27 +0000</updated>
                            <resolved>Tue, 24 Jul 2018 16:14:20 +0000</resolved>
                                                    <fixVersion>Lustre 2.12.0</fixVersion>
                    <fixVersion>Lustre 2.10.5</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="229864" author="gerrit" created="Mon, 2 Jul 2018 15:11:35 +0000"  >&lt;p&gt;John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/32753&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32753&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11107&quot; title=&quot;getxattr() returns 0 length values for nonexistent xattrs (with xattr_cache=0)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11107&quot;&gt;&lt;del&gt;LU-11107&lt;/del&gt;&lt;/a&gt; mdt: handle nonexistent xattrs correctly&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: b927ed32003a2571e992ea681f4b8615c2b447a5&lt;/p&gt;</comment>
                            <comment id="230833" author="gerrit" created="Tue, 24 Jul 2018 16:01:09 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/32753/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32753/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11107&quot; title=&quot;getxattr() returns 0 length values for nonexistent xattrs (with xattr_cache=0)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11107&quot;&gt;&lt;del&gt;LU-11107&lt;/del&gt;&lt;/a&gt; mdt: handle nonexistent xattrs correctly&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 39c7ac4c0dce3c62795814cd12a78bec1877520b&lt;/p&gt;</comment>
                            <comment id="230845" author="pjones" created="Tue, 24 Jul 2018 16:14:20 +0000"  >&lt;p&gt;Landed for 2.12&lt;/p&gt;</comment>
                            <comment id="231194" author="gerrit" created="Wed, 1 Aug 2018 01:58:31 +0000"  >&lt;p&gt;Minh Diep (mdiep@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/32910&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32910&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11107&quot; title=&quot;getxattr() returns 0 length values for nonexistent xattrs (with xattr_cache=0)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11107&quot;&gt;&lt;del&gt;LU-11107&lt;/del&gt;&lt;/a&gt; mdt: handle nonexistent xattrs correctly&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 52ef02bc1f821e0edf7d50e1d51aea1c232d7e21&lt;/p&gt;</comment>
                            <comment id="231427" author="gerrit" created="Fri, 3 Aug 2018 20:30:30 +0000"  >&lt;p&gt;John L. Hammond (jhammond@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/32910/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/32910/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11107&quot; title=&quot;getxattr() returns 0 length values for nonexistent xattrs (with xattr_cache=0)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11107&quot;&gt;&lt;del&gt;LU-11107&lt;/del&gt;&lt;/a&gt; mdt: handle nonexistent xattrs correctly&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 0ae570b4dccc621c0c5fca9407dd053fc957cc1c&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="52524">LU-11074</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|hzzykv:</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>