From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760910AbaEMOGG (ORCPT ); Tue, 13 May 2014 10:06:06 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:48319 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760678AbaEMOGE (ORCPT ); Tue, 13 May 2014 10:06:04 -0400 Date: Tue, 13 May 2014 07:05:57 -0700 From: Christoph Hellwig To: Miklos Szeredi Cc: Al Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Chris Mason , Jan Kara , "Theodore Ts'o" , Jaegeuk Kim , OGAWA Hirofumi , Mikulas Patocka , David Woodhouse , Dave Kleikamp , Joern Engel , Ryusuke Konishi , Bob Copeland , Christoph Hellwig , Artem Bityutskiy , Dave Chinner Subject: Re: [PATCH] vfs: add noreplace_rename2() Message-ID: <20140513140557.GA30660@infradead.org> References: <20140513135622.GB17233@tucsk.piliscsaba.szeredi.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140513135622.GB17233@tucsk.piliscsaba.szeredi.hu> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 13, 2014 at 03:56:22PM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > RENAME_NOREPLACE is trivial to implement for most filesystems. This adds a > helper that can be assigned to ->rename2() and calls ->rename(). > > Only suitable for local filesystems, i.e. those that cannot have files > "spontaneously" appear (like NFS and friends). I don't like this approach at all. Please bite the bullet and rename ->rename2 to ->rename and all the proper rejecting of non-supported flags intstead of further locking down the duplication.