From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758168AbcHWOrI (ORCPT ); Tue, 23 Aug 2016 10:47:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42412 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757700AbcHWOrC (ORCPT ); Tue, 23 Aug 2016 10:47:02 -0400 Date: Tue, 23 Aug 2016 10:47:10 -0400 From: Greg Kroah-Hartman To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Eric Van Hensbergen , David Howells , Ilya Dryomov , Jan Harkes , Tyler Hicks , Boaz Harrosh , Oleg Drokin , Trond Myklebust , Mark Fasheh , Mike Marshall Subject: Re: [PATCH 4/7] fs: make remaining filesystems use .rename2 Message-ID: <20160823144710.GB9798@kroah.com> References: <1471961132-1675-1-git-send-email-mszeredi@redhat.com> <1471961132-1675-5-git-send-email-mszeredi@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471961132-1675-5-git-send-email-mszeredi@redhat.com> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 23, 2016 at 04:05:29PM +0200, Miklos Szeredi wrote: > This is trivial to do: > > - add flags argument to foo_rename() > - check if flags is zero > - assign foo_rename() to .rename2 instead of .rename > > This doesn't mean it's impossible to support RENAME_NOREPLACE for these > filesystems, but it is not trivial, like for local filesystems. > RENAME_NOREPLACE must guarantee atomicity (i.e. it shouldn't be possible > for a file to be created on one host while it is overwritten by rename on > another host). > > Filesystems converted: > > 9p, afs, ceph, coda, ecryptfs, exofs, kernfs, lustre, ncpfs, nfs, ocfs2, > orangefs. > > After this, we can get rid of the duplicate interfaces for rename. > > Signed-off-by: Miklos Szeredi > Cc: Eric Van Hensbergen > Cc: David Howells > Cc: Ilya Dryomov > Cc: Jan Harkes > Cc: Tyler Hicks > Cc: Boaz Harrosh > Cc: Greg Kroah-Hartman > Cc: Oleg Drokin > Cc: Trond Myklebust > Cc: Mark Fasheh > Cc: Mike Marshall Acked-by: Greg Kroah-Hartman