All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	viro@ZenIV.linux.org.uk, torvalds@linux-foundation.org,
	hch@infradead.org, akpm@linux-foundation.org,
	dhowells@redhat.com, zab@redhat.com, jack@suse.cz, tytso@mit.edu,
	mszeredi@suse.cz
Subject: Re: [RFC PATCH 0/7] cross rename
Date: Wed, 02 Oct 2013 18:58:16 -0700	[thread overview]
Message-ID: <524CCF38.9000304@zytor.com> (raw)
In-Reply-To: <1380643239-16060-1-git-send-email-miklos@szeredi.hu>

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

  parent reply	other threads:[~2013-10-03  1:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01 16:00 [RFC PATCH 0/7] cross rename Miklos Szeredi
2013-10-01 16:00 ` [PATCH 1/7] vfs: rename: move d_move() up Miklos Szeredi
2013-10-01 16:00 ` [PATCH 2/7] vfs: rename: use common code for dir and non-dir Miklos Szeredi
2013-10-01 16:00 ` [PATCH 3/7] vfs: add renameat2 syscall and cross-rename Miklos Szeredi
2013-10-02 12:26   ` Jan Kara
2013-10-02 14:59     ` Miklos Szeredi
2013-10-01 16:00 ` [PATCH 4/7] ext4: rename: create ext4_renament structure for local vars Miklos Szeredi
2013-10-02 12:01   ` Jan Kara
2013-10-01 16:00 ` [PATCH 5/7] ext4: rename: move EMLINK check up Miklos Szeredi
2013-10-02 12:05   ` Jan Kara
2013-10-01 16:00 ` [PATCH 6/7] ext4: rename: split out helper functions Miklos Szeredi
2013-10-02 12:19   ` Jan Kara
2013-10-01 16:00 ` [PATCH 7/7] ext4: add cross rename support Miklos Szeredi
2013-10-03  1:58 ` H. Peter Anvin [this message]
2013-10-03  5:34   ` [RFC PATCH 0/7] cross rename Linus Torvalds
2013-10-03  5:36     ` H. Peter Anvin
2013-10-04 23:58 ` Andy Lutomirski
2013-10-05  0:11   ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524CCF38.9000304@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@suse.cz \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=zab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.