From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754209AbcHWPi2 (ORCPT ); Tue, 23 Aug 2016 11:38:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55332 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753878AbcHWPg2 (ORCPT ); Tue, 23 Aug 2016 11:36:28 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1471961132-1675-5-git-send-email-mszeredi@redhat.com> References: <1471961132-1675-5-git-send-email-mszeredi@redhat.com> <1471961132-1675-1-git-send-email-mszeredi@redhat.com> To: Miklos Szeredi Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Eric Van Hensbergen , Ilya Dryomov , Jan Harkes , Tyler Hicks , Boaz Harrosh , Greg Kroah-Hartman , Oleg Drokin , Trond Myklebust , Mark Fasheh , Mike Marshall Subject: Re: [PATCH 4/7] fs: make remaining filesystems use .rename2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28723.1471966583.1@warthog.procyon.org.uk> Date: Tue, 23 Aug 2016 16:36:23 +0100 Message-ID: <28724.1471966583@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 23 Aug 2016 15:36:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 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: David Howells [AFS]