<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:47:43 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-5006] chown/chgrp doesn&apos;t work for files created by lfs setstripe</title>
                <link>https://jira.whamcloud.com/browse/LU-5006</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This is easy to reproduce:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;lfs setstripe -c 1 -i 0 /mnt/lustre/a&lt;/li&gt;
	&lt;li&gt;dd if=/dev/zero of=/mnt/lustre/a bs=1M count=1 conv=notrunc&lt;/li&gt;
	&lt;li&gt;chown $ID /mnt/lustre/a&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The uid on OST object will not be changed after chown.&lt;/p&gt;

&lt;p&gt;Look into the code osp_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;new&lt;/span&gt; object, the very first -&amp;gt;attr_set()
         * initializing attributes needs no logging
         * all subsequent one are subject to the
         * logging and synchronization with OST */
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (o-&amp;gt;opo_new) {
                o-&amp;gt;opo_new = 0;
                RETURN(0);
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I don&apos;t quite see why this is necessary, but seems it&apos;ll break chown in above situation: OST object is created in &apos;dd&apos; operation, and the first attr_set operation after create is the &apos;chown&apos;, and it&apos;s skipped.&lt;/p&gt;</description>
                <environment></environment>
        <key id="24560">LU-5006</key>
            <summary>chown/chgrp doesn&apos;t work for files created by lfs setstripe</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>Mon, 5 May 2014 07:40:59 +0000</created>
                <updated>Wed, 14 Feb 2018 12:30:28 +0000</updated>
                            <resolved>Wed, 12 Nov 2014 16:55:32 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                    <version>Lustre 2.5.1</version>
                    <version>Lustre 2.4.3</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="83159" author="niu" created="Mon, 5 May 2014 07:42:33 +0000"  >&lt;p&gt;Mike, could you comment on this one? Thanks.&lt;/p&gt;</comment>
                            <comment id="83160" author="bzzz" created="Mon, 5 May 2014 07:45:09 +0000"  >&lt;p&gt;the idea behind this check is to skip the very fist -&amp;gt;attr_set() which is called right after -&amp;gt;do_create(). otherwise we&apos;ll be generating additional MDS-OST interaction on every file creation. probably the solution is to clear opo_new in the beginning of osp_attr_set()&lt;/p&gt;</comment>
                            <comment id="83167" author="niu" created="Mon, 5 May 2014 09:57:27 +0000"  >&lt;blockquote&gt;
&lt;p&gt;the idea behind this check is to skip the very fist -&amp;gt;attr_set() which is called right after -&amp;gt;do_create(). otherwise we&apos;ll be generating additional MDS-OST interaction on every file creation. &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Alex, you mean a very first attr_set() issued from kernel or lustre? I didn&apos;t see in lustre where attr_set() is issued after osp object created.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;probably the solution is to clear opo_new in the beginning of osp_attr_set()&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;In the situation I described, the first attr_set() is from the chown, so I&apos;m afraid this solution won&apos;t work.&lt;/p&gt;</comment>
                            <comment id="83168" author="bzzz" created="Mon, 5 May 2014 09:59:52 +0000"  >&lt;p&gt;mdd_create() does:&lt;br/&gt;
dt_create()&lt;br/&gt;
dt_attr_set()&lt;/p&gt;

&lt;p&gt;this is the first dt_attr_set() I meant. it&apos;s used to initialize attributes (including UID/GID), but we ignore that as those are supposed to be initialized via the client.&lt;/p&gt;</comment>
                            <comment id="83174" author="niu" created="Mon, 5 May 2014 11:40:59 +0000"  >&lt;p&gt;I see, so the problem is that for the create with MDS_OPEN_DELAY_CREATE flag, osp object will not be created in mdd_create(), and it&apos;ll be created later on next open (in mdd_create_data()),  which means the very first attr_set() from mdd_create() won&apos;t be applied on those osp objects.&lt;/p&gt;

&lt;p&gt;Probably we can introduce a flag for lu_attr-&amp;gt;la_valid to inform osp layer that the the attr_set is come from mdd_create()?&lt;/p&gt;</comment>
                            <comment id="83175" author="bzzz" created="Mon, 5 May 2014 12:00:38 +0000"  >&lt;p&gt;no flags like that, please. Ideally we shouldn&apos;t be setting anything with dt_attr_set() in mdd_create() because dt_create() has attributes as an argument. though it&apos;s hard to change now. Instead we can call dt_attr_set() in mdd_create_data() like mdd_create() does. with a good comment, explaining this &lt;span class=&quot;error&quot;&gt;&amp;#91;censored&amp;#93;&lt;/span&gt;.&lt;/p&gt;</comment>
                            <comment id="85288" author="adilger" created="Fri, 30 May 2014 18:25:59 +0000"  >&lt;p&gt;Isn&apos;t it better to remove the special-case check in osp_attr_set() and instead have mdd_create() not call dt_attr_set() at all?  That removes complexity instead if adding it. &lt;/p&gt;</comment>
                            <comment id="95828" author="jlevi" created="Tue, 7 Oct 2014 17:24:43 +0000"  >&lt;p&gt;Niu,&lt;br/&gt;
Would you be able to have a look at this one?&lt;br/&gt;
Thank you!&lt;/p&gt;</comment>
                            <comment id="95995" author="niu" created="Thu, 9 Oct 2014 06:16:21 +0000"  >&lt;p&gt;Hi, Alex/Andreas&lt;/p&gt;

&lt;p&gt;I&apos;m wondering why the first attr_set call on object creation is necessary (mdd_object_initialize()), it seems to me that the object attribute has been initialized in OSD layer on create (__osd_object_create() -&amp;gt; osd_attr_init()). Did I miss anything?&lt;/p&gt;</comment>
                            <comment id="95997" author="bzzz" created="Thu, 9 Oct 2014 06:50:17 +0000"  >&lt;p&gt;we did this way in Orion, but there was an issue related to ACLs. iirc, default ACLs being applied can change mode stored in the object so additonal dt_attr_set() was needed. but I&apos;d welcome a fresh look at this part and even more I&apos;d welcome removal of that dt_attr_set() and workarounds in OSP (opo_new flag).&lt;/p&gt;</comment>
                            <comment id="95999" author="niu" created="Thu, 9 Oct 2014 08:36:03 +0000"  >&lt;p&gt;Thanks, Alex. I didn&apos;t see how default ACLs can change the object mode from code. (seems default ACLs is set after the additional attr_set call in current code). I cooked a patch to remove this additional attr_set: &lt;a href=&quot;http://review.whamcloud.com/#/c/12243/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/12243/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="96000" author="bzzz" created="Thu, 9 Oct 2014 08:39:58 +0000"  >&lt;p&gt;please check mdd_acl_init() -&amp;gt; __mdd_fix_mode_acl(). it looks like the code was reorganized since that. the fingers are crossed for the testing &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="96001" author="bzzz" created="Thu, 9 Oct 2014 08:41:24 +0000"  >&lt;p&gt;forgot to mention - sanity/103 does check ACLs very well, please make sure it passes with ldiskfs and ZFS.&lt;/p&gt;</comment>
                            <comment id="98974" author="jlevi" created="Wed, 12 Nov 2014 16:55:32 +0000"  >&lt;p&gt;Patch landed to Master. Please reopen ticket if more work is needed.&lt;/p&gt;</comment>
                            <comment id="114428" author="mhanafi" created="Wed, 6 May 2015 19:57:30 +0000"  >&lt;p&gt;Is this patch  required for 2.5.3?&lt;/p&gt;</comment>
                            <comment id="114698" author="niu" created="Fri, 8 May 2015 03:13:30 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Is this patch required for 2.5.3?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Yes, 2.5.3 doesn&apos;t have this fix. If your application perform the commands like the reproducer does, it&apos;ll hit the problem.&lt;/p&gt;</comment>
                            <comment id="114760" author="jaylan" created="Fri, 8 May 2015 20:07:31 +0000"  >&lt;p&gt;Can you cook up patches for 2.5.3 and 2.4.3, Niu? Cherry-picking resulted in big difference, especially in lustre/osp/osp_object.c.&lt;/p&gt;</comment>
                            <comment id="114822" author="niu" created="Mon, 11 May 2015 01:49:59 +0000"  >&lt;p&gt;Ok, I&apos;ll port it soon.&lt;/p&gt;</comment>
                            <comment id="114998" author="gerrit" created="Tue, 12 May 2015 07:34:06 +0000"  >&lt;p&gt;Niu Yawei (yawei.niu@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/14773&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/14773&lt;/a&gt;&lt;br/&gt;
Subject: &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; mdd: don&apos;t call attr_set on object create&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_5&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: c79136559617ffd23415dab3d995e8aec994fab0&lt;/p&gt;</comment>
                            <comment id="114999" author="gerrit" created="Tue, 12 May 2015 07:34:48 +0000"  >&lt;p&gt;Niu Yawei (yawei.niu@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/14774&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/14774&lt;/a&gt;&lt;br/&gt;
Subject: &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; mdd: don&apos;t call attr_set on object create&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_4&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: d0a2067981a16a1d536db3801d58328fbad2ff7e&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="27699">LU-5951</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|hzwls7:</customfieldvalue>

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