Re: [PATCH 4/7] fs: make remaining filesystems use .rename2
From: Mike Marshall
Date: Tue Aug 23 2016 - 13:38:38 EST
I looked at this in today's linux-next and ran a few renames through...
Acked-by:: Mike Marshall <hubcap@xxxxxxxxxxxx>
On Tue, Aug 23, 2016 at 10:47 AM, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Aug 23, 2016 at 04:05:29PM +0200, Miklos Szeredi wrote:
>> This is trivial to do:
>>
>> - add flags argument to foo_rename()
>> - check if flags is zero
>> - assign foo_rename() to .rename2 instead of .rename
>>
>> This doesn't mean it's impossible to support RENAME_NOREPLACE for these
>> filesystems, but it is not trivial, like for local filesystems.
>> RENAME_NOREPLACE must guarantee atomicity (i.e. it shouldn't be possible
>> for a file to be created on one host while it is overwritten by rename on
>> another host).
>>
>> Filesystems converted:
>>
>> 9p, afs, ceph, coda, ecryptfs, exofs, kernfs, lustre, ncpfs, nfs, ocfs2,
>> orangefs.
>>
>> After this, we can get rid of the duplicate interfaces for rename.
>>
>> Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx>
>> Cc: Eric Van Hensbergen <ericvh@xxxxxxxxx>
>> Cc: David Howells <dhowells@xxxxxxxxxx>
>> Cc: Ilya Dryomov <idryomov@xxxxxxxxx>
>> Cc: Jan Harkes <jaharkes@xxxxxxxxxx>
>> Cc: Tyler Hicks <tyhicks@xxxxxxxxxxxxx>
>> Cc: Boaz Harrosh <ooo@xxxxxxxxxxxxxxx>
>> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>> Cc: Oleg Drokin <oleg.drokin@xxxxxxxxx>
>> Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
>> Cc: Mark Fasheh <mfasheh@xxxxxxxx>
>> Cc: Mike Marshall <hubcap@xxxxxxxxxxxx>
>
> Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>