<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:50:15 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-5296] lod_attr_set() skips attr_set on osp objects incorrectly</title>
                <link>https://jira.whamcloud.com/browse/LU-5296</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This is a regression introduced by fix of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4690&quot; title=&quot;sanity test_4: Expect error removing in-use dir /mnt/lustre/remote_dir&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4690&quot;&gt;&lt;del&gt;LU-4690 &quot;lod: separate master object with master stripe&quot;&lt;/del&gt;&lt;/a&gt; (&lt;a href=&quot;http://review.whamcloud.com/9511&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9511&lt;/a&gt; commit 60e07b972114df24105a3a1bfa7365892f72a4a7).&lt;/p&gt;

&lt;p&gt;In lod_attr_set():&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;for&lt;/span&gt; (i = 0; i &amp;lt; lo-&amp;gt;ldo_stripenr; i++) {
                LASSERT(lo-&amp;gt;ldo_stripe[i]);
+               &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (dt_object_exists(lo-&amp;gt;ldo_stripe[i]) == 0)
+                       &lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
                rc = dt_attr_set(env, lo-&amp;gt;ldo_stripe[i], attr, handle, capa);
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc) {
                        CERROR(&lt;span class=&quot;code-quote&quot;&gt;&quot;failed declaration: %d\n&quot;&lt;/span&gt;, rc);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Since dt_object_exists() always return false for the osp object (for OST object), any attr_set to osp object will be skipped mistakenly, and chown/chgrp won&apos;t set UID/GID to OST objects at the end.&lt;/p&gt;

&lt;p&gt;As per Di&apos;s suggestion, we&apos;d add additional IS_DIR checking here.&lt;/p&gt;</description>
                <environment></environment>
        <key id="25439">LU-5296</key>
            <summary>lod_attr_set() skips attr_set on osp objects incorrectly</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="niu">Niu Yawei</assignee>
                                    <reporter username="niu">Niu Yawei</reporter>
                        <labels>
                            <label>HB</label>
                    </labels>
                <created>Fri, 4 Jul 2014 05:30:13 +0000</created>
                <updated>Wed, 1 Oct 2014 07:34:25 +0000</updated>
                            <resolved>Thu, 10 Jul 2014 15:35:49 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="88182" author="niu" created="Fri, 4 Jul 2014 07:42:17 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/10989&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10989&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="88183" author="niu" created="Fri, 4 Jul 2014 08:06:46 +0000"  >&lt;p&gt;Actually, current osp thread can&apos;t handle exceptions gracefully, I opened another ticket to track the problem there. See &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5297&quot; title=&quot;osp_sync_thread can&amp;#39;t handle invalid record gracefully&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5297&quot;&gt;&lt;del&gt;LU-5297&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="88185" author="bzzz" created="Fri, 4 Jul 2014 12:46:18 +0000"  >&lt;p&gt;then it&apos;s probably better remove this check from LOD ?&lt;/p&gt;</comment>
                            <comment id="88186" author="niu" created="Fri, 4 Jul 2014 12:59:48 +0000"  >&lt;blockquote&gt;
&lt;p&gt;then it&apos;s probably better remove this check from LOD ?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think DNE relies on that check for dir object. Di, any comment on this? Thanks.&lt;/p&gt;</comment>
                            <comment id="88198" author="adilger" created="Fri, 4 Jul 2014 17:15:00 +0000"  >&lt;p&gt;How does this relate to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5006&quot; title=&quot;chown/chgrp doesn&amp;#39;t work for files created by lfs setstripe&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5006&quot;&gt;&lt;del&gt;LU-5006 &quot;chown/chgrp doesn&apos;t work for files created by lfs setstripe&quot;&lt;/del&gt;&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="88199" author="adilger" created="Fri, 4 Jul 2014 17:16:14 +0000"  >&lt;p&gt;What is the impact of this bug?  Does it mean that quota will be incorrect during normal usage? Is it causing test failures?&lt;/p&gt;</comment>
                            <comment id="88211" author="adilger" created="Fri, 4 Jul 2014 18:29:42 +0000"  >&lt;p&gt;I see in further investigation that this would be causing sanity-quota test_34 failures, but because of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4515&quot; title=&quot;Test failure sanity-quota test_34: Used space for user 60000 is 0, expected 2048&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4515&quot;&gt;&lt;del&gt;LU-4515&lt;/del&gt;&lt;/a&gt; this test was being skipped.  I&apos;ve merged the patch from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4515&quot; title=&quot;Test failure sanity-quota test_34: Used space for user 60000 is 0, expected 2048&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4515&quot;&gt;&lt;del&gt;LU-4515&lt;/del&gt;&lt;/a&gt; to re-enable test_34 into &lt;a href=&quot;http://review.whamcloud.com/10989&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10989&lt;/a&gt; and increased the priority of this patch to critical so that it will land for 2.6.0.&lt;/p&gt;</comment>
                            <comment id="88227" author="di.wang" created="Sat, 5 Jul 2014 07:51:35 +0000"  >&lt;blockquote&gt;
&lt;p&gt;I think DNE relies on that check for dir object. Di, any comment on this? Thanks.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Hmm,  If you remove dt_object_exists here then you need move attr_set after real sub-stripes is created in mdd_object_create(), probably something like &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;diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c
index d85dfef..b7efe22 100644
--- a/lustre/mdd/mdd_dir.c
+++ b/lustre/mdd/mdd_dir.c
@@ -1834,7 +1834,7 @@ static int mdd_object_initialize(const struct lu_env *env,
                                 struct lu_attr *attr, struct thandle *handle,
                                 const struct md_op_spec *spec)
 {
-        int rc;
+        int rc = 0;
         ENTRY;
 
         /*
@@ -1845,7 +1845,6 @@ static int mdd_object_initialize(const struct lu_env *env,
          *  (2) maybe, the child attributes should be set in OSD when creation.
          */
 
-       rc = mdd_attr_set_internal(env, child, attr, handle, 0);
        /* arguments are supposed to stay the same */
        if (S_ISDIR(attr-&amp;gt;la_mode)) {
                 /* Add &quot;.&quot; and &quot;..&quot; for newly created dir */
@@ -2187,6 +2186,9 @@ static int mdd_object_create(const struct lu_env *env, struct mdd_object *pobj,
                        GOTO(err_destroy, rc);
        }
 
+       rc = mdd_attr_set_internal(env, son, attr, handle, 0);
+       if (rc != 0)
+               GOTO(err_destroy, rc);
 #ifdef CONFIG_FS_POSIX_ACL
        if (def_acl_buf != NULL &amp;amp;&amp;amp; def_acl_buf-&amp;gt;lb_len &amp;gt; 0 &amp;amp;&amp;amp;
            S_ISDIR(attr-&amp;gt;la_mode)) {
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="88233" author="niu" created="Mon, 7 Jul 2014 01:26:23 +0000"  >&lt;blockquote&gt;
&lt;p&gt;How does this relate to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5006&quot; title=&quot;chown/chgrp doesn&amp;#39;t work for files created by lfs setstripe&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5006&quot;&gt;&lt;del&gt;LU-5006&lt;/del&gt;&lt;/a&gt; &quot;chown/chgrp doesn&apos;t work for files created by lfs setstripe&quot;?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This is not related to that one.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is the impact of this bug? Does it mean that quota will be incorrect during normal usage? Is it causing test failures?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Quota will be incorrect after chown/chgrp. s-q test-34 will fail.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I see in further investigation that this would be causing sanity-quota test_34 failures, but because of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4515&quot; title=&quot;Test failure sanity-quota test_34: Used space for user 60000 is 0, expected 2048&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4515&quot;&gt;&lt;del&gt;LU-4515&lt;/del&gt;&lt;/a&gt; this test was being skipped. I&apos;ve merged the patch from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4515&quot; title=&quot;Test failure sanity-quota test_34: Used space for user 60000 is 0, expected 2048&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4515&quot;&gt;&lt;del&gt;LU-4515&lt;/del&gt;&lt;/a&gt; to re-enable test_34 into &lt;a href=&quot;http://review.whamcloud.com/10989&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10989&lt;/a&gt; and increased the priority of this patch to critical so that it will land for 2.6.0.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Thank you for doing this. Andreas.&lt;/p&gt;</comment>
                            <comment id="88236" author="bzzz" created="Mon, 7 Jul 2014 04:25:14 +0000"  >&lt;p&gt;wouldn&apos;t it better to remove this attr_set() - we&apos;re creating a new object and we do specify attributes for the creation. iirc, we do additional attr_set because it was easy for MDD to initialize ACL/i_mode, but this case demonstrates some issues.. &lt;/p&gt;</comment>
                            <comment id="88239" author="niu" created="Mon, 7 Jul 2014 06:41:06 +0000"  >&lt;blockquote&gt;
&lt;p&gt;wouldn&apos;t it better to remove this attr_set() - we&apos;re creating a new object and we do specify attributes for the creation. iirc, we do additional attr_set because it was easy for MDD to initialize ACL/i_mode, but this case demonstrates some issues..&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Alex, we are talking about chown/chgrp case but not creation 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>
                            <comment id="88241" author="bzzz" created="Mon, 7 Jul 2014 07:41:42 +0000"  >&lt;p&gt;sorry, the monday is my only possible excuse..&lt;/p&gt;</comment>
                            <comment id="88244" author="bzzz" created="Mon, 7 Jul 2014 10:22:36 +0000"  >&lt;p&gt;hmm, but if we don&apos;t have original attr_set() in create path, then we don&apos;t this check as well?&lt;/p&gt;</comment>
                            <comment id="88706" author="jlevi" created="Thu, 10 Jul 2014 15:35:49 +0000"  >&lt;p&gt;Patch landed to Master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="23395">LU-4690</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="22817">LU-4515</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|hzwqmn:</customfieldvalue>

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