[PATCH] copy-chunk / FSRVP (remote snapshots) changes

Jeremy Allison jra at samba.org
Fri Oct 5 18:27:28 MDT 2012


On Tue, Sep 18, 2012 at 02:09:17AM +0200, David Disseldorp wrote:
> Hi,
> 
> I've cleaned up, collapsed and rebased the copy-chunk and FSRVP (remote
> snapshot RPC server) changes presented at SambaXP. Additionally:
> - copy-chunk request processing takes locks into account
> - permission checking is performed when processing FSRVP requests
> - The FSRVP server retains state across restart
> - Extra smbtorture tests are added
> - vfs_btrfs is now documented
> 
> The code can be found at:
> git://git.samba.org/ddiss/samba.git async_fsrvp_srv_wip_sxp2012_btrfs_enums_collapsed_ioctl
> http://gitweb.samba.org/?p=ddiss/samba.git;a=shortlog;h=refs/heads/async_fsrvp_srv_wip_sxp2012_btrfs_enums_collapsed_ioctl
> 
> I'll be running this code at the SDC plugfest, so stop by if you'd like
> to see it in action. I'd also much appreciate review of any or all of
> the changes.

FYI. I haven't forgotten about this. I'm currently doing
some cleanup work on the second patch :

s3-rpc: convert process_complete_pdu and callers async

In lots of error cases you're doing things like:

                        if (data_left > 0) {
                                DEBUG(0, ("Unacceptable, more than one PDU\n"));
                                state->data_processed = -1;
                                tevent_req_done(req);
                                return tevent_req_post(req, ev);
                        }

and I think this should look like:

                        if (data_left > 0) {
                                DEBUG(0, ("Unacceptable, more than one PDU\n"));
                                state->data_processed = -1;
                                tevent_req_error(req, EINVAL);
                                return tevent_req_post(req, ev);
                        }

as the:

	tevent_req_done(req);
	return tevent_req_post(req, ev);

tends to be done in success codepaths (IMHO).

tevent experts please feel free to correct me if I'm wrong !

Cheers,

Jeremy.


More information about the samba-technical mailing list