[PATCH 00/17] add SMB2 server-side copy support - V3

Jeremy Allison jra at samba.org
Tue Jan 15 15:27:41 MST 2013


On Tue, Jan 15, 2013 at 05:22:55PM +0100, David Disseldorp wrote:
> This change-set adds support for the FSCTL_SRV_COPYCHUNK and
> FSCTL_SRV_REQUEST_RESUME_KEY server-side copy SMB2 ioctls, allowing
> for network round-trip avoidance during a file copy, i.e.:
> http://www.samba.org/~ddiss/slides/snappery_samba/img17.html
> 
> Thanks to the MS protocol documentation team for shedding light on a
> number of areas I found unclear in the existing docs.
> 
> Changes since V2:
> - Add CHECK_READ and CHECK_WRITE permissions checks
> - Change vfs_default copychunk handler to support src=dest requests
> - Improve copychunk request validation
> - Process/report copychunk response data independent of status
> - Add extra tests: overlapping IO, sparse regions, marshalling, etc.
> 
> Feedback appreciated.

OK - this is really great work and I'm planning to push to
master once it's gone through make test !

However, just wanted to let you know there's some more work
I'm planning to do on this once it's in.

Right now each FSCTL_SRV_COPYCHUNK request is synchronous,
in that it will tie up the server into doing a loop of
PREAD/PWRITE calls for every chunk sent.

I'm planning on making that asynchronous, and split up the
PREAD/PWRITE loop into an async set of functions using
PREAD_SEND/PREAD_RECV, PWRITE_SEND/PWRITE_RECV which will
allow the server to keep processing other SMB2/3 requests
whilst the copychunk is in action.

To do that requires a little restructuring of where you
do the locking/unlocking for each request) - that needs
to be moved into the setup/teardown loop inside
vfswrap_copy_chunk_send(), but I think I can make this
work in the same way we do in smbd/aio.c.

More when I've gotten the patches worked out. But this
is *amazingly* good work !

Really well done and I'm planning to push tomorrow.

Cheers,

	Jeremy.


More information about the samba-technical mailing list