<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:07:11 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-7239] mdd_attr_set() synchronous when it need not be</title>
                <link>https://jira.whamcloud.com/browse/LU-7239</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;chmod() and friends are sometimes synchronous when they do not need to be.&lt;/p&gt;

&lt;p&gt;We encountered this with teams who use unix groups to allow shared file access.  When rsync&apos;ing (or extracting from tar, etc.) the creation of the directory tree on the destination was a series of mkdir() followed by fchownat() calls.  A parent directory within the tree had S_ISGID set, and so after mkdir(child), the child also had S_ISGID set; but the subsequent fchownat(child, S_ISGID|some_mode) was forced to be synchronous by the current code.&lt;/p&gt;

&lt;p&gt;With regards to S_ISVTX | S_ISUID | S_ISGID, the current code causes mdt_attr_set() to be synchronous when any of those bits are set in the new mode, even if they were set already.  The code should check differences between old and new modes, as it already does for bits in S_IRWXUGO.&lt;/p&gt;

&lt;p&gt;Some handling is also inconsistent with the intent of permission_needs_sync(), making the chmod operation synchronous when permissions are tightened on a directory.&lt;/p&gt;

&lt;p&gt;For S_ISUID, permissions are relaxed when the bit is set, in the sense that the user is allowed to create a file/directory owned by another user.  So removing the bit is tightening restrictions.&lt;/p&gt;

&lt;p&gt;For S_ISGID, nothing is relaxed or tightened - the bit only takes effect if the user could have done the equivalent chown() anyway.  So I believe this bit should not be considered at all.&lt;/p&gt;</description>
                <environment></environment>
        <key id="32416">LU-7239</key>
            <summary>mdd_attr_set() synchronous when it need not be</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="hongchao.zhang">Hongchao Zhang</assignee>
                                    <reporter username="ofaaland">Olaf Faaland</reporter>
                        <labels>
                            <label>llnl</label>
                            <label>patch</label>
                            <label>zfs</label>
                    </labels>
                <created>Wed, 30 Sep 2015 18:06:14 +0000</created>
                <updated>Wed, 23 Jan 2019 16:34:38 +0000</updated>
                            <resolved>Wed, 23 Jan 2019 16:34:38 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                    <version>Lustre 2.5.4</version>
                                    <fixVersion>Lustre 2.13.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="128927" author="ofaaland" created="Wed, 30 Sep 2015 18:12:29 +0000"  >&lt;p&gt;I will submit a patch for the changes described in the description.&lt;/p&gt;

&lt;p&gt;I also propose that the default value of the sync_permission flag be reversed.  As mentioned in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3671&quot; title=&quot;why are permission changes synchronous?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3671&quot;&gt;&lt;del&gt;LU-3671&lt;/del&gt;&lt;/a&gt;, when sync_permission is 0, the filesystem meets POSIX requirements.  The performance hit for making mdd_attr_set() synchronous is very great in some scenarios, and although it&apos;s certainly more likely a user will noticed a failure on a local filesystem than they will on one node of a distributed one, that logic applies to any operation, not just chown or chmod.&lt;/p&gt;</comment>
                            <comment id="128930" author="jgmitter" created="Wed, 30 Sep 2015 18:17:55 +0000"  >&lt;p&gt;Hi Bobijam,&lt;/p&gt;

&lt;p&gt;Can you take a look at the patch when it is submitted?&lt;/p&gt;

&lt;p&gt;Thanks.&lt;br/&gt;
Joe&lt;/p&gt;</comment>
                            <comment id="128931" author="adilger" created="Wed, 30 Sep 2015 18:21:16 +0000"  >&lt;p&gt;One factor that contributes significantly here is that TXG sync for ZFS is extremely slow (at most once per second).  Conversely, this is basically a non-issue for ldiskfs MDTs.  Improving the ZFS sync performance (via ZIL &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4009&quot; title=&quot;Add ZIL support to osd-zfs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4009&quot;&gt;LU-4009&lt;/a&gt;) or having ZFS/osd-zfs actually start a sync on the TXG in &lt;tt&gt;dt_sync()&lt;/tt&gt; rather than just calling &lt;tt&gt;txg_wait_synced()&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="129028" author="gerrit" created="Thu, 1 Oct 2015 17:43:13 +0000"  >&lt;p&gt;Olaf Faaland-LLNL (faaland1@llnl.gov) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/16699&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16699&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7239&quot; title=&quot;mdd_attr_set() synchronous when it need not be&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7239&quot;&gt;&lt;del&gt;LU-7239&lt;/del&gt;&lt;/a&gt; mdd: make mdd_attr_set() synchronous less often&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 46cfac7c97dec8348ec17d334f5b9aa3041b0625&lt;/p&gt;</comment>
                            <comment id="129052" author="morrone" created="Thu, 1 Oct 2015 21:00:20 +0000"  >&lt;p&gt;Yes, of course the ZIL can make sync faster.    Even better than having the ZIL for synchronous operations is not needing the ZIL in the first place.  Alex talked about this sort of thing in his recent LAD&apos;15 talk.&lt;/p&gt;

&lt;p&gt;This seems like an area where the choice to go synchronous is worth revisiting since the performance impact is significant.&lt;/p&gt;</comment>
                            <comment id="236484" author="ofaaland" created="Tue, 6 Nov 2018 19:32:43 +0000"  >&lt;p&gt;I notice also that &lt;a href=&quot;https://jira.whamcloud.com/browse/LUDOC-180&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.whamcloud.com/browse/LUDOC-180&lt;/a&gt; is still open and sync_permission does not appear in the operations manual.&lt;/p&gt;</comment>
                            <comment id="240598" author="gerrit" created="Wed, 23 Jan 2019 09:19:33 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/16699/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/16699/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7239&quot; title=&quot;mdd_attr_set() synchronous when it need not be&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7239&quot;&gt;&lt;del&gt;LU-7239&lt;/del&gt;&lt;/a&gt; mdd: make mdd_attr_set() synchronous less often&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: f8e9fb6e10f5b10a83c85b26f146380dd91cb384&lt;/p&gt;</comment>
                            <comment id="240624" author="pjones" created="Wed, 23 Jan 2019 16:34:38 +0000"  >&lt;p&gt;Landed for 2.13&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="20098">LU-3671</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53159">LU-11303</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_10490" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>End date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 1 Oct 2015 18:06:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzxp8v:</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>
                                                                                                                        <customfield id="customfield_10493" key="com.atlassian.jira.plugin.system.customfieldtypes:datepicker">
                        <customfieldname>Start date</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 30 Sep 2015 18:06:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>