From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] vfs: add noreplace_rename2() Date: Tue, 13 May 2014 08:29:11 -0700 Message-ID: <20140513152911.GB15679@infradead.org> References: <20140513135622.GB17233@tucsk.piliscsaba.szeredi.hu> <20140513140557.GA30660@infradead.org> <20140513144354.GG17233@tucsk.piliscsaba.szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Stephen Rothwell To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: <20140513144354.GG17233@tucsk.piliscsaba.szeredi.hu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, May 13, 2014 at 04:43:54PM +0200, Miklos Szeredi wrote: > There was pushback from Stephen Rothwell as well as Al, which is why it ended up > being a separate op. I can see some reason to not want it for an inintial merged, but having two parallel methods in the long run is a bad design. > I was always hoping to merge the two, but until there's clear indication that > it's going to get accepted, there's no point in me preparing and maintaining > such a patch. How about we slowly work towards doing the right thing? 1) make vfs_rename call ->rename2 if it exists instead of ->rename 2) switch all filesystems that you're adding NOREPLACE support for to use ->rename2 3) see how many ->rename instances we'll have left after a few iterations of 2. A default method implementation that just calls a slightly more complicated version of the method is just useless clutter.