<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:44:55 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-11557] Implement renameat2() with RENAME_EXCHANGE and RENAME_WHITEOUT</title>
                <link>https://jira.whamcloud.com/browse/LU-11557</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It would be nice to have support for &lt;tt&gt;renameat2()&lt;/tt&gt;&apos;s linux specific flags &lt;tt&gt;RENAME_EXCHANGE&lt;/tt&gt; and &lt;tt&gt;RENAME_WHITEOUT&lt;/tt&gt; so that Lustre could be safely used as a backend to some overlayfs implementations in user space.&lt;/p&gt;

&lt;p&gt;For example, the code snippet below works on ext4 and xfs but not on Lustre:&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;
#include &amp;lt;errno.h&amp;gt;
#include &amp;lt;fcntl.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;linux/fs.h&amp;gt;
#include &amp;lt;sys/syscall.h&amp;gt;

&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; main(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; argc, &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *argv[])
{
  &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ret;

  ret = syscall(SYS_renameat2, AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_EXCHANGE);
  &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (ret != 0)
    fprintf(stderr, &lt;span class=&quot;code-quote&quot;&gt;&quot;renameat2(%s, %s) ret=%d, errno=%d\n&quot;&lt;/span&gt;, argv[1], argv[2], ret, errno);
  &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; ret;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;$ renameat2 file1 file2
renameat2(file1, file2) ret=-1 errno=22&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Example on ext4:&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;$ echo file1 &amp;gt; file1
$ echo file2 &amp;gt; file2
$ ./renameat2 file1 file2
renameat2 ret=0 errno=0
$ cat file1
file2
$ cat file2
file1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;br/&gt;
 Stephane&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>CentOS 7</environment>
        <key id="53690">LU-11557</key>
            <summary>Implement renameat2() with RENAME_EXCHANGE and RENAME_WHITEOUT</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="sthiell">Stephane Thiell</reporter>
                        <labels>
                            <label>medium</label>
                    </labels>
                <created>Mon, 22 Oct 2018 21:47:04 +0000</created>
                <updated>Tue, 19 Sep 2023 10:58:38 +0000</updated>
                                            <version>Lustre 2.10.5</version>
                    <version>Lustre 2.12.2</version>
                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="235242" author="adilger" created="Tue, 23 Oct 2018 01:26:57 +0000"  >&lt;p&gt;Stephane, is this something that you will be looking into, or should we try to find someone on our side to look into it?&lt;/p&gt;</comment>
                            <comment id="235247" author="sthiell" created="Tue, 23 Oct 2018 02:23:20 +0000"  >&lt;p&gt;Hi Andreas!&lt;/p&gt;

&lt;p&gt;It&apos;s a &quot;would be nice to have&quot; ticket. I don&apos;t plan to look into it but I will be happy to test patches if you decide it&apos;s worth implementing it in Lustre. &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;&#160; Thanks!&lt;/p&gt;</comment>
                            <comment id="235335" author="pjones" created="Tue, 23 Oct 2018 08:09:18 +0000"  >&lt;p&gt;Dongyang&lt;/p&gt;

&lt;p&gt;Could you please look into this?&lt;/p&gt;

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

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="297787" author="asmadeus" created="Mon, 5 Apr 2021 09:03:52 +0000"  >&lt;p&gt;(Was: request to fix the LU description example code. Thanks Andreas!)&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="55587">LU-12272</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|i004rb:</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>