linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Ric Wheeler <ricwheeler@gmail.com>
Cc: Jeremy Allison <jra@samba.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-nfs@vger.kernel.org, Joel Becker <jlbec@evilplan.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: copy offload support in Linux - new system call needed?
Date: Mon, 19 Dec 2011 13:38:23 +0100	[thread overview]
Message-ID: <4EEF303F.8090809@suse.de> (raw)
In-Reply-To: <4EE90753.6060700@gmail.com>

On 12/14/2011 09:30 PM, Ric Wheeler wrote:
> On 12/14/2011 02:59 PM, Jeremy Allison wrote:
>> On Wed, Dec 14, 2011 at 02:22:07PM -0500, Ric Wheeler wrote:
>>> Back at LinuxCon Prague, we talked about the new NFS and SCSI
>>> commands that let us offload copy operations to a storage device
>>> (like an NFS server or storage array).
>>>
>>> This got new life in the virtual machine world where you might want
>>> to clone bulky guest files or ranges of blocks and was driven
>>> through the standards bodies by vmware, microsoft and some of the
>>> major storage vendors. Windows8 has this functionality fully coded
>>> and integrated in the GUI, I assume vmware also uses it and there
>>> are some vendors who announced support at the SNIA SDC conference.
>>>
>>> We had an active thread a couple of years back that came out of the
>>> reflink work and, at the time, there seemed to be moderately
>>> positive support for adding a new system call that would fit this
>>> use case (Joel Becker's copyfile()).
>>>
>>> Can we resurrect this effort? Is copyfile() still a good way to go,
>>> or should we look at other hooks?
>> Windows uses a COPYCHUNK call, which specifies the
>> following parameters:
>>
>> Definition of a copy "chunk":
>>
>> hyper source_off;
>> hyper target_off;
>> uint32 length;
>>
>> and an array of these chunks which is passed
>> into their kernel.
>>
>> This is what we have to implement in Samba.
>>
>> Jeremy.
> 
> This is a public pointer to the draft NFS proposal:
> 
> http://tools.ietf.org/id/draft-lentini-nfsv4-server-side-copy-06.txt
> 
> The T10 site has some click through that I was not too happy about
> agreeing to. NetApp (Fred Knight) had some nice presentations that
> he presented about how SCSI does this in two different ways...
> 

Yes, the 'XCOPY Lite' mechanism.

With that the whole copy process is broken into two steps:
- Create a reference to the requested blocks
- Use that reference to request the operation

The neat thing with that is that there might be some delay between
those steps, effectively creating a snapshot in time.

An additional bonus is that one doesn't have to create those
over-complicated source and target descriptors, but rather have the
array create one for you.

So all-in-all nice and easy to use. With the slight disadvantage
that no-one implements it. Yet.

Hence we might be wanting to use the old-style EXTENDED COPY after
all ...

However, both approaches have in common that an opaque 'identifier'
is used to identify any currently running copy process.

So when designing this interface we should keep in mind that we
would need to store this identifier somewhere. As as loath as I'm to
admit it, the async-I/O mechanism would fit the bill far better than
a single copyfile() call ...

Which could be easily implemented on top of the Async I/O call, btw.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-12-19 12:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 19:22 copy offload support in Linux - new system call needed? Ric Wheeler
2011-12-14 19:27 ` Al Viro
     [not found]   ` <20111214192739.GN2203-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2011-12-14 19:42     ` Ric Wheeler
     [not found]       ` <4EE8FC2E.3010207-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-14 22:27         ` J. Bruce Fields
2011-12-15 14:59           ` Trond Myklebust
2011-12-15 15:52             ` Chris Mason
2011-12-15 16:00               ` Trond Myklebust
2011-12-15 16:03               ` Jeff Layton
     [not found]                 ` <20111215110330.33aed3a6-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>
2011-12-15 16:06                   ` Trond Myklebust
     [not found]                     ` <1323965176.14317.11.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
2011-12-15 16:16                       ` Jeff Layton
2011-12-15 16:38                         ` Trond Myklebust
2011-12-15 16:08             ` Loke, Chetan
     [not found]               ` <D3F292ADF945FB49B35E96C94C2061B91516E391-2s2rCY1e8UXHBhWB4kaBDUEOCMrvLtNR@public.gmane.org>
2011-12-15 16:11                 ` Trond Myklebust
2011-12-15 16:40                   ` Loke, Chetan
2011-12-15 16:53                     ` Trond Myklebust
     [not found]                       ` <1323968015.14317.28.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
2011-12-15 17:18                         ` Ric Wheeler
2011-12-15 17:25                           ` Trond Myklebust
2011-12-15 17:31                           ` Loke, Chetan
2011-12-15 17:55                             ` Ric Wheeler
2011-12-15 17:27                         ` Loke, Chetan
     [not found]             ` <1323961140.14317.2.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
2011-12-15 17:44               ` J. Bruce Fields
2011-12-16  8:00       ` Joel Becker
2011-12-14 19:59 ` Jeremy Allison
2011-12-14 20:30   ` Ric Wheeler
2011-12-19 12:38     ` Hannes Reinecke [this message]
2011-12-19 22:19   ` H. Peter Anvin
2011-12-19 22:34     ` Jeremy Allison
2011-12-19 22:57     ` Dave Chinner
2011-12-19 23:29       ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EEF303F.8090809@suse.de \
    --to=hare@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=jlbec@evilplan.org \
    --cc=jra@samba.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ricwheeler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).