<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:36:21 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-10579] chlg: -1(null) changelog for setfattr on trusted.*</title>
                <link>https://jira.whamcloud.com/browse/LU-10579</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;There seems to be an issue with XATTR changelogs for some specific prefixes such as &lt;tt&gt;trusted&lt;/tt&gt; or &lt;tt&gt;security&lt;/tt&gt;, but not &lt;tt&gt;user&lt;/tt&gt;.&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;# bash lustre/tests/llmount.sh
# touch /mnt/lustre/blob
# lctl --device lustre-MDT0000 changelog_register
# setfattr -n trusted.test -v test /mnt/lustre/blob
# lfs changelog lustre-MDT0000
1 -1(null) 08:13:35.501636480 2018.01.30 0x0 t=[0x200000401:0x1:0x0] j=setfattr.0 ef=0x1 u=0:0
# setfattr -n user.test -v test /mnt/lustre/blob
# lfs changelog lustre-MDT0000
1 -1(null) 08:13:35.501636480 2018.01.30 0x0 t=[0x200000401:0x1:0x0] j=setfattr.0 ef=0x1 u=0:0
2 15XATTR 08:13:21.191376815 2018.01.30 0x0 t=[0x200000401:0x1:0x0] j=setfattr.0 ef=0x1 u=0:0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="50457">LU-10579</key>
            <summary>chlg: -1(null) changelog for setfattr on trusted.*</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="cealustre">CEA</reporter>
                        <labels>
                    </labels>
                <created>Tue, 30 Jan 2018 08:24:30 +0000</created>
                <updated>Wed, 5 Aug 2020 13:50:25 +0000</updated>
                            <resolved>Tue, 9 Oct 2018 23:11:29 +0000</resolved>
                                                    <fixVersion>Lustre 2.10.6</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="219457" author="pjones" created="Tue, 30 Jan 2018 18:12:16 +0000"  >&lt;p&gt;Bruno&lt;/p&gt;

&lt;p&gt;Could you please investigate?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="219458" author="jhammond" created="Tue, 30 Jan 2018 18:14:37 +0000"  >&lt;p&gt;It seems that we&apos;re not handling these prefixes in &lt;tt&gt;mdd_xattr_changelog_type()&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-keyword&quot;&gt;enum&lt;/span&gt; changelog_rec_type
mdd_xattr_changelog_type(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env, struct mdd_device *mdd,
                         &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *xattr_name)
{
        &lt;span class=&quot;code-comment&quot;&gt;/* Layout changes systematically recorded */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strcmp(XATTR_NAME_LOV, xattr_name) == 0 ||
            strncmp(XATTR_LUSTRE_LOV, xattr_name,
                    strlen(XATTR_LUSTRE_LOV)) == 0)
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; CL_LAYOUT;

        &lt;span class=&quot;code-comment&quot;&gt;/* HSM information changes systematically recorded */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strcmp(XATTR_NAME_HSM, xattr_name) == 0)
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; CL_HSM;

        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (has_prefix(xattr_name, XATTR_USER_PREFIX) ||
            has_prefix(xattr_name, XATTR_NAME_POSIX_ACL_ACCESS) ||
            has_prefix(xattr_name, XATTR_NAME_POSIX_ACL_DEFAULT))
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; CL_XATTR;

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; -1;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="231726" author="pjones" created="Thu, 9 Aug 2018 17:38:21 +0000"  >&lt;p&gt;Mike&lt;/p&gt;

&lt;p&gt;Can you please investigate?&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="232033" author="olaf" created="Thu, 16 Aug 2018 08:22:54 +0000"  >&lt;p&gt;I ran into this working on changelog processing for HPE DMF 7.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;mdd_xattr_changelog_type()&lt;/tt&gt; returns -1 to indicate that no record should be emitted. This is itself a rather dubious practice: I&apos;d prefer that CL_XATTR records be generated for those cases as well. At present I got half my wish, because they&apos;re generated as -1 records.&lt;/p&gt;

&lt;p&gt;The reason is that the return type is not &lt;tt&gt;int&lt;/tt&gt; but &lt;tt&gt;enum changelog_rec_type&lt;/tt&gt;, and this is an unsigned type. So checks like the one in&#160; &lt;tt&gt;mdd_declare_xattr_set()&lt;/tt&gt; always fail, and the record is generated with type &lt;tt&gt;((enum changelog_rec_type)-1)&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; mdd_declare_xattr_set(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env,
                                 struct mdd_device *mdd,
                                 struct mdd_object *obj,
                                 &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_buf *buf,
                                 &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *name,
                                 &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; fl, struct thandle *handle)
{
        &lt;span class=&quot;code-keyword&quot;&gt;enum&lt;/span&gt; changelog_rec_type type;
        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; rc;

        rc = mdo_declare_xattr_set(env, obj, buf, name, fl, handle);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc)
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; rc;

        type = mdd_xattr_changelog_type(env, mdd, name);
&amp;gt;&amp;gt;&amp;gt;     &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (type &amp;lt; 0)
&amp;gt;&amp;gt;&amp;gt;             &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; 0; &lt;span class=&quot;code-comment&quot;&gt;/* no changelog to store */&lt;/span&gt;

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; mdd_declare_changelog_store(env, mdd, type, NULL, NULL, handle);
}

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;My preferred solution is that these changelog records be generated for these cases, rather than dropped on the floor. This can be done by changing &lt;tt&gt;mdd_xattr_changelog_type()&lt;/tt&gt; to look like this:&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-keyword&quot;&gt;enum&lt;/span&gt; changelog_rec_type
mdd_xattr_changelog_type(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env, struct mdd_device *mdd,
                         &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *xattr_name)
{
        &lt;span class=&quot;code-comment&quot;&gt;/* Layout changes systematically recorded */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strcmp(XATTR_NAME_LOV, xattr_name) == 0 ||
            strncmp(XATTR_LUSTRE_LOV, xattr_name,
                    strlen(XATTR_LUSTRE_LOV)) == 0)
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; CL_LAYOUT;

        &lt;span class=&quot;code-comment&quot;&gt;/* HSM information changes systematically recorded */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strcmp(XATTR_NAME_HSM, xattr_name) == 0)
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; CL_HSM;

        &lt;span class=&quot;code-comment&quot;&gt;/* Everything &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; systematically recorded */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; CL_XATTR;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;If this is done then the checks of the return value can also be removed of course.&lt;/p&gt;</comment>
                            <comment id="232036" author="olaf" created="Thu, 16 Aug 2018 12:09:51 +0000"  >&lt;p&gt;This looks like fallout from&#160;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7264&quot; title=&quot;store ChangeLog record for security.* xattr changes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7264&quot;&gt;&lt;del&gt;LU-7264&lt;/del&gt;&lt;/a&gt; so would be present in 2.10 and later.&lt;/p&gt;</comment>
                            <comment id="232402" author="jhammond" created="Tue, 21 Aug 2018 20:53:19 +0000"  >&lt;p&gt;Fixed in 2.11 by &lt;a href=&quot;https://review.whamcloud.com/28251&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28251&lt;/a&gt; &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9727&quot; title=&quot;Lustre Audit with Changelogs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9727&quot;&gt;&lt;del&gt;LU-9727&lt;/del&gt;&lt;/a&gt; lustre: add CL_GETXATTR for Changelogs.&lt;/p&gt;</comment>
                            <comment id="232404" author="gerrit" created="Tue, 21 Aug 2018 21:16:50 +0000"  >&lt;p&gt;John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/33048&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/33048&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10579&quot; title=&quot;chlg: -1(null) changelog for setfattr on trusted.*&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10579&quot;&gt;&lt;del&gt;LU-10579&lt;/del&gt;&lt;/a&gt; mdd: emit changelogs for securit* and trusted xattrs&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 9958d6f33212d818a439801b88c480207e449908&lt;/p&gt;</comment>
                            <comment id="232528" author="olaf" created="Thu, 23 Aug 2018 18:21:07 +0000"  >&lt;p&gt;Note that 33048 doesn&apos;t address the issue that returning -1 from &lt;tt&gt;mdd_xattr_changelog_type()&lt;/tt&gt; does not, in fact, suppress the generation of a changelog entry.&lt;/p&gt;</comment>
                            <comment id="232574" author="jhammond" created="Fri, 24 Aug 2018 13:22:18 +0000"  >&lt;p&gt;Hi Olaf,&lt;/p&gt;

&lt;p&gt;Sorry, I didn&apos;t read your comments as carefully as I should have.&lt;/p&gt;

&lt;p&gt;I think we can add a negative sentinel value to the enum that forces the compiler to use a signed type for it. Or return &lt;tt&gt;CL_SETXATTR&lt;/tt&gt; as a catch all type.&lt;/p&gt;</comment>
                            <comment id="232746" author="olaf" created="Wed, 29 Aug 2018 17:04:19 +0000"  >&lt;p&gt;Hi John,&lt;/p&gt;

&lt;p&gt;As noted, my preference would be to just emit the changelog event in all cases. It is simpler to code, and I do not see the value of suppressing the events for certain xattrs. So returning CL_SETXATTR for all the &quot;other&quot; cases has my vote.&lt;/p&gt;</comment>
                            <comment id="232748" author="olaf" created="Wed, 29 Aug 2018 17:16:13 +0000"  >&lt;p&gt;Expanding a bit on my previous comment.&lt;/p&gt;

&lt;p&gt;What I&apos;m looking for is the completion of this sentence: &quot;No changelog processor should be notified of changes to an extended attribute named like &lt;em&gt;this&lt;/em&gt; because ...&quot;&lt;/p&gt;

&lt;p&gt;Maybe there is one. But until there is one, I continue to think we should emit changelog entries for changes to every extended attribute.&lt;/p&gt;</comment>
                            <comment id="234572" author="gerrit" created="Mon, 8 Oct 2018 16:27:15 +0000"  >&lt;p&gt;John L. Hammond (jhammond@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/33048/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/33048/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10579&quot; title=&quot;chlg: -1(null) changelog for setfattr on trusted.*&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10579&quot;&gt;&lt;del&gt;LU-10579&lt;/del&gt;&lt;/a&gt; mdd: emit changelogs for security and trusted xattrs&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ab246d23566d7da1a41479b688833f47976b6428&lt;/p&gt;</comment>
                            <comment id="234662" author="pjones" created="Tue, 9 Oct 2018 23:11:29 +0000"  >&lt;p&gt;Landed for 2.10.6. Not needed for master&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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzrvj:</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>