Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:50845 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752994AbbJNStx (ORCPT ); Wed, 14 Oct 2015 14:49:53 -0400 Date: Wed, 14 Oct 2015 11:49:46 -0700 From: Christoph Hellwig To: Andy Lutomirski Cc: Christoph Hellwig , Anna Schumaker , "Darrick J. Wong" , linux-nfs@vger.kernel.org, Linux btrfs Developers List , Linux FS Devel , Linux API , Zach Brown , Al Viro , Chris Mason , Michael Kerrisk-manpages , andros@netapp.com Subject: Re: [PATCH v5 8/9] vfs: Add vfs_copy_file_range() support for pagecache copies Message-ID: <20151014184946.GA15214@infradead.org> References: <1443634014-3026-1-git-send-email-Anna.Schumaker@Netapp.com> <1443634014-3026-9-git-send-email-Anna.Schumaker@Netapp.com> <20151011142203.GA31867@infradead.org> <20151012231749.GC11398@birch.djwong.org> <561E980C.9010509@Netapp.com> <20151014182701.GC31225@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-nfs-owner@vger.kernel.org List-ID: On Wed, Oct 14, 2015 at 11:38:13AM -0700, Andy Lutomirski wrote: > One might argue that reflink is like copy + immediate dedupe. Not, it's not. It's all that and more, because it is an operation that is atomic vs other writes to the file and it's an operation that either clones the whole range or nothing. That's a very important difference. > Also, I > can imagine there being network protocols over which you can't really > tell the difference between reflink and server-to-server copy. For NFS we specificly have a CLONE and a COPY operations so that smart servers can support the proper clone, and dumb servers still get copy offload. Other protocols might only be able to support COPY if they don't have a CLONE primitive. Note that a clone also always is a valid copy, just with much simpler an at the same time more useful semantics. Take a look at the NFSv4.2 sections for CLONE vs COPY if you're interested.