<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:33:47 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-17238] negative xattr cache on client</title>
                <link>https://jira.whamcloud.com/browse/LU-17238</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It should be possible to cache &lt;b&gt;negative&lt;/b&gt; xattr entries (i.e. xattr names that do not exist) for an inode on the client if it has the &lt;tt&gt;MDS_INODELOCK_XATTR&lt;/tt&gt; lock locally, since a new xattr cannot be created on the inode without the MDS cancelling this lock.&lt;/p&gt;

&lt;p&gt;There are a few xattrs that are handled differently.  See &lt;tt&gt;ll_xattr_cache_refill()&lt;/tt&gt;:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;tt&gt;XATTR_NAME_ACL_ACCESS&lt;/tt&gt; is cached under the &lt;tt&gt;MDS_INODELOCK_LOOKUP&lt;/tt&gt; lock since it is permission related&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;XATTR_NAME_SOM&lt;/tt&gt; shouldn&apos;t be cached since it may change without a lock&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;XATTR_NAME_SELINUX&lt;/tt&gt;, &lt;tt&gt;XATTR_NAME_SMACK&lt;/tt&gt; are cached in the kernel already since they shouldn&apos;t be modified for files after creation&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The negative cached &lt;tt&gt;ll_xattr_entry&lt;/tt&gt; could store &quot;&lt;tt&gt;xe_value = ERR_PTR(&amp;#45;ENODATA)&lt;/tt&gt;&quot; (or presumably whatever other error was returned for the &lt;tt&gt;MDS_GETXATTR&lt;/tt&gt; for that xattr name to indicate the xattr doesn&apos;t exist.&lt;/p&gt;

&lt;p&gt;There is also a discussion in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10276&quot; title=&quot;Revise what MDS_INODELOCK_XATTR protects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10276&quot;&gt;LU-10276&lt;/a&gt; to store some xattrs under a different DLM lock, which would cause problems for using &lt;tt&gt;listxattr()&lt;/tt&gt; for cached xattrs that are not actually in the client cache.  In such cases it would be possible to store &quot;&lt;tt&gt;xe_value = ERR_PTR(&amp;#45;EREMOTE)&lt;/tt&gt;&quot; in the xattr cache, so that they still appear in the &lt;tt&gt;listxattr()&lt;/tt&gt; output but the values are not actually stored in the cache.&lt;/p&gt;

&lt;p&gt;It appears that the lack of some xattrs in the client cache is already a problem for &lt;tt&gt;listxattr()&lt;/tt&gt; today, since &lt;tt&gt;security.selinux&lt;/tt&gt; is not being listed on the client, even though it is stored on the inode:&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;# getfattr -d -m - -e hex /myth/tmp
getfattr: Removing leading &apos;/&apos; from absolute path names
# file: myth/tmp
trusted.link=0xdff1ea11010000002d000000000000000000000000000000001500000000002080011c08b68000000000746d70
trusted.lma=0x0000000000000000625f030002000000b07f000000000000

# debugfs -c -R &quot;stat ROOT/tmp&quot; /dev/vgmyth/lvmythmdt0.ssd
debugfs 1.47.0-wc4 (22-Jun-2023)
:
Extended attributes:
  lma: fid=[0x200035f62:0x7fb0:0x0] compat=0 incompat=0
  security.selinux (37) = &quot;unconfined_u:object_r:unlabeled_t:s0\000&quot;
  linkea: idx=0 parent=[0x208001:0x1c08b680:0x0] name=&apos;tmp&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;For the &lt;tt&gt;security.selinux&lt;/tt&gt; xattr this isn&apos;t a huge problem, since most applications will just request the xattr without first listing if it exists, but it should properly be listed when requested (e.g for backups and similar).&lt;/p&gt;</description>
                <environment></environment>
        <key id="78646">LU-17238</key>
            <summary>negative xattr cache on client</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</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="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>medium</label>
                    </labels>
                <created>Sat, 28 Oct 2023 07:41:53 +0000</created>
                <updated>Sat, 28 Oct 2023 07:53:01 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="28996">LU-10276</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="17700">LU-2869</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="78647">LU-17239</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|i03zw7:</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>