From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Allison Subject: Re: New copyfile system call - discuss before LSF? Date: Thu, 21 Feb 2013 10:29:19 -0800 Message-ID: <20130221182919.GB13435@samba2> References: <512606DF.5050706@redhat.com> <4FA345DA4F4AE44899BD2B03EEEC2FA9235D998C@SACEXCMBX04-PRD.hq.netapp.com> Reply-To: Jeremy Allison Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: Ric Wheeler , Linux FS Devel , "linux-kernel@vger.kernel.org" , "Chris L. Mason" , Christoph Hellwig , Alexander Viro , "Martin K. Petersen" , Hannes Reinecke To: "Myklebust, Trond" Return-path: Content-Disposition: inline In-Reply-To: <4FA345DA4F4AE44899BD2B03EEEC2FA9235D998C@SACEXCMBX04-PRD.hq.netapp.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Feb 21, 2013 at 01:51:53PM +0000, Myklebust, Trond wrote: > On Thu, 2013-02-21 at 12:37 +0100, Ric Wheeler wrote: > > We have debated the need to have a system call to allow for offloading copy > > operations, for example to an NFS server (part to the new NFS 4.2 > > specification), SCSI target device (two different SCSI commands do this), local > > file systems (reflink, etc) and I suspect many other possible parts of the stack > > could implement this. > > sendfile64() pretty much already has the right arguments for a > "copyfile", however it would be nice to add a 'flags' parameter: the > NFSv4.2 version would use that to specify whether or not to copy file > metadata. What would be really nice is if sendfile allowed zero-copy from network socket to a file descriptor. That would help a *lot* of my small system OEMs (and no splice() just doesn't cut it :-). Jeremy.