Re: RFC: renameat2 emulation

Jason Thorpe <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
> On Sep 14, 2024, at 4:17 AM, Shiv <[email protected]> wrote:
> 
> As part of my GSoC project, me and my mentor have
> decided to extend support for renameat2 in the compat_linux.
> We have decided to enable support for 2 newer flags, namely
> RENAME_NOREPLACE and RENAME_EXCHANGE. There are
> 2 particular questions, on which we would like to gather communities
> insights:

Will also be responding to Taylor’s response to this message, but I wanted to add one bit of info here:

> 2. RENAME_EXCHANGE requires atomic swap of filenames and the
> filetypes need not be the same. Can any of the existing VFS operations
> be used to do so? And if this should be done in VFS layer or any specific
> support is expected from the file system to implement this?

The underlying file system must support this explicitly.  This ensures that the rename-swap will be atomic.

-- thorpej
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.