From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [RFC PATCH 0/7] cross rename Date: Fri, 04 Oct 2013 16:58:29 -0700 Message-ID: <524F5625.4080807@mit.edu> References: <1380643239-16060-1-git-send-email-miklos@szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 To: Miklos Szeredi Return-path: In-Reply-To: <1380643239-16060-1-git-send-email-miklos@szeredi.hu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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. How hard would it be to also add RENAME_NOREPLACE that fails if the destination already exists? IMO this would get rid of the last sane use of hard links (link + unlink to simulate non-clobbering rename), and it would be nice on filesystems that don't have hard links. Windows has supported this since Windows 98, IIRC (using MoveFileEx). --Andy