[PATCH] Make server-side copy (copy-chunk) async

Jeremy Allison jra at samba.org
Wed Mar 22 20:22:23 UTC 2017


On Wed, Mar 22, 2017 at 07:14:05PM +0100, Ralph Böhme via samba-technical wrote:
> Hi!
> 
> Attached is a patchset I've been working on that makes our server-side copy
> asynchronous.
> 
> At the SMB layer the chunks are processed sequentially in order, but left to
> right merged if copy ranges are adjecent. In the backend (vfs_default) I'm
> essentially just using pread|pwrite_send|recv instead of the sync versions.
> 
> I'm also adding a small new feature to tevent: cancel forwarding. It allows the
> implementation of a tevent request using subrequest to request forwarding of
> cancels to be done automagically by the tevent library. This is useful for
> forwarding cancels through a chain of subrequests.

OK. I have to ask the nasty question :-).

Do you *really* need to extend tevent to add this ?

You're only forwarding cancel to one event at a time.

Couldn't you just add a normal cancel function
on the parent req, which calls tevent_req_cancel()
on the subreq stored in the parent req private data ?

It's essentially boilerplate code to do this. I guess
it can't be a normal utility function as the state
struct is different on each req.

Jeremy.



More information about the samba-technical mailing list