Re: [RFC PATCH 0/7] cross rename

2013-10-04 Thread Linus Torvalds
On Fri, Oct 4, 2013 at 4:58 PM, Andy Lutomirski wrote: > > How hard would it be to also add RENAME_NOREPLACE that fails if the > destination already exists? Trivial. And I agree that that should be a good flag to have. Linus -- To unsubscribe from this list: send the line

Re: [RFC PATCH 0/7] cross rename

2013-10-04 Thread Andy Lutomirski
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 >

Re: [RFC PATCH 0/7] cross rename

2013-10-04 Thread Andy Lutomirski
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

Re: [RFC PATCH 0/7] cross rename

2013-10-04 Thread Linus Torvalds
On Fri, Oct 4, 2013 at 4:58 PM, Andy Lutomirski l...@amacapital.net wrote: How hard would it be to also add RENAME_NOREPLACE that fails if the destination already exists? Trivial. And I agree that that should be a good flag to have. Linus -- To unsubscribe from this list: send

Re: [RFC PATCH 0/7] cross rename

2013-10-02 Thread H. Peter Anvin
Yes... Al and I had a brief conversation about the complexities over IRC this evening. Linus Torvalds wrote: >On Wed, Oct 2, 2013 at 6:58 PM, H. Peter Anvin wrote: >> >> I would suggest it shouldn't be renameat2() but rather renameat3(), >i.e. >> rename file A -> B, if B exists rename B to C.

Re: [RFC PATCH 0/7] cross rename

2013-10-02 Thread Linus Torvalds
On Wed, Oct 2, 2013 at 6:58 PM, H. Peter Anvin wrote: > > 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

Re: [RFC PATCH 0/7] cross rename

2013-10-02 Thread H. Peter Anvin
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 >

Re: [RFC PATCH 0/7] cross rename

2013-10-02 Thread H. Peter Anvin
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

Re: [RFC PATCH 0/7] cross rename

2013-10-02 Thread Linus Torvalds
On Wed, Oct 2, 2013 at 6:58 PM, H. Peter Anvin h...@zytor.com wrote: 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

Re: [RFC PATCH 0/7] cross rename

2013-10-02 Thread H. Peter Anvin
Yes... Al and I had a brief conversation about the complexities over IRC this evening. Linus Torvalds torva...@linux-foundation.org wrote: On Wed, Oct 2, 2013 at 6:58 PM, H. Peter Anvin h...@zytor.com wrote: I would suggest it shouldn't be renameat2() but rather renameat3(), i.e. rename file

[RFC PATCH 0/7] cross rename

2013-10-01 Thread Miklos Szeredi
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

[RFC PATCH 0/7] cross rename

2013-10-01 Thread Miklos Szeredi
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