<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:59:02 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-13176] rename() to another directory should transfer project quota</title>
                <link>https://jira.whamcloud.com/browse/LU-13176</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When rename() has a target directory with different project ID from the source directory, the kernel currently returns &lt;tt&gt;-EXDEV&lt;/tt&gt;, which forces userspace to perform a full data copy of the file.  This is slow when the files are large, and does not provide any security benefit for the user or admin in the end. &lt;/p&gt;

&lt;p&gt;It would be better to change the project ID to that of the target directory, and assign the quota for the file to the new project ID, the same as is done with &lt;tt&gt;chown()&lt;/tt&gt; and &lt;tt&gt;chgrp()&lt;/tt&gt; for UID and GID quotas.&lt;/p&gt;</description>
                <environment></environment>
        <key id="57919">LU-13176</key>
            <summary>rename() to another directory should transfer project quota</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>easy</label>
                    </labels>
                <created>Tue, 28 Jan 2020 21:48:55 +0000</created>
                <updated>Fri, 4 Aug 2023 04:28:51 +0000</updated>
                            <resolved>Mon, 31 Jan 2022 04:39:31 +0000</resolved>
                                                    <fixVersion>Lustre 2.15.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>11</watches>
                                                                            <comments>
                            <comment id="262065" author="adilger" created="Tue, 28 Jan 2020 21:52:48 +0000"  >&lt;p&gt;It looks like the reasoning behind this design choice is described in the email thread &quot;&lt;tt&gt;quota: add project quota support&lt;/tt&gt;&quot; between the primary ext4 and XFS developers:&lt;/p&gt;
&lt;blockquote&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;    &amp;gt; ... we should check with the XFS folks what happens if you move a file
    &amp;gt; from one directory which belongs to one project quota to another
    &amp;gt; directory that has a different project quota (or no quota whatsoever).
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Rename to a destination with a different project quota gives EXDEV, same as if you were trying to rename across different filesystems. See &lt;tt&gt;xfs_rename()&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;    &amp;gt; I suspect the right answer is that the quota gets transferred from one
    &amp;gt; project to another, so that it is a true directory-tree quota system,
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;XFS doesn&apos;t transfer the quota from projid to projid because it&apos;s borderline impossible to correctly track all the metadata allocation/free operations that can happen in a rename operation and account them to the correct quota. Hence all those corner cases are avoided by treating it as &lt;tt&gt;EXDEV&lt;/tt&gt; and forcing userspace to &lt;tt&gt;cp&lt;/tt&gt;/&lt;tt&gt;unlink&lt;/tt&gt; the files rather than rename.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I agree that this is much more of a problem for Lustre than it is for local filesystems. As a workaround for this behavior when moving a large directory tree, it seems possible to use &quot;&lt;tt&gt;lfs project&lt;/tt&gt;&quot; to change the project ID of the source directory to match that of the target directory before the directory is moved, at which point the &quot;&lt;tt&gt;mv&lt;/tt&gt;&quot; operation should just be doing a rename since the project IDs will be the same for the source and target.&lt;/p&gt;</comment>
                            <comment id="319182" author="gerrit" created="Thu, 25 Nov 2021 08:50:25 +0000"  >&lt;p&gt;&quot;Hongchao Zhang &amp;lt;hongchao@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/45660&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45660&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13176&quot; title=&quot;rename() to another directory should transfer project quota&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13176&quot;&gt;&lt;del&gt;LU-13176&lt;/del&gt;&lt;/a&gt; mdd: rename file with different project ID&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2adb3f2bba3e693d1537917abd9038db5dc301f5&lt;/p&gt;</comment>
                            <comment id="324520" author="gerrit" created="Mon, 31 Jan 2022 01:37:45 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/45660/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45660/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13176&quot; title=&quot;rename() to another directory should transfer project quota&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13176&quot;&gt;&lt;del&gt;LU-13176&lt;/del&gt;&lt;/a&gt; mdd: rename file with different project ID&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 88c26912a3237fb63923bbb7c7b09111f9f30bbe&lt;/p&gt;</comment>
                            <comment id="324541" author="pjones" created="Mon, 31 Jan 2022 04:39:31 +0000"  >&lt;p&gt;Landed for 2.15&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 ">
                                        <issuelink>
            <issuekey id="53159">LU-11303</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="69194">LU-15667</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53159">LU-11303</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="67377">LU-15294</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="77335">LU-17016</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|i00sqn:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>