Re: [RFC PATCH 0/7] cross rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/01/2013 09:00 AM, Miklos Szeredi wrote:
> This series adds a new syscall, renameat2(), which is the same as renameat() but
> with a flags argument.  Internally i_op->reaname2() is also added, which can
> later be merged with ->rename() but is kept separately for now, since this would
> just blow up this patch without helping review.
> 
> The purpose of extending rename is to add cross-rename, a symmetric variant of
> rename, which exchanges the two files.  This allows interesting things, which
> were not possible before, for example atomically replacing a directory tree with
> a symlink, etc...
> 

I would suggest it shouldn't be renameat2() but rather renameat3(), i.e.
rename file A -> B, if B exists rename B to C.  It may not be desirable
to expose the stale B in the same namespace as A, but still want it to
be possible to scavenge it.  Obviously, A=C is a valid subcase.

	-hpa


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux