On Tue, Jul 06, 2010 at 05:37:41PM -0700, Darren Reed wrote:
> I had some spare time over the long weekend to have a play with this.
>
> I've filed the bug as CR#6967089. The patch (or suggested fix) is below.
>
> I'll probably work on it a bit more to test it and see if it needs any
> other changes.
[...]
> zc.zc_begin_record = drr_noswap->drr_u.drr_begin;
> zc.zc_cookie = infd;
> - zc.zc_guid = flags.force;
> - if (flags.verbose) {
> - (void) printf("%s %s stream of %s into %s\n",
> - flags.dryrun ? "would receive" : "receiving",
> - drrb->drr_fromguid ? "incremental" : "full",
> - drrb->drr_toname, zc.zc_value);
> - (void) fflush(stdout);
> + zc.zc_guid = flags->force;
> + skipstream = flags->dryrun;
> + if (flags->verbose) {
> + if (flags->matching != NULL &&
> + strcmp(drrb->drr_toname, flags->matching)) {
> + (void) printf("skipping stream %s due to mismatch\n",
> + drrb->drr_toname);
> + (void) fflush(stdout);
> + skipstream = B_TRUE;
Am I correct in reading the patch that unmatching streams will be
skipped only in verbose mode?
> + } else {
> + (void) printf("%s %s stream of %s into %s\n",
> + flags->dryrun ? "would receive" : "receiving",
> + drrb->drr_fromguid ? "incremental" : "full",
> + drrb->drr_toname, zc.zc_value);
> + (void) fflush(stdout);
> + }
> }
>
> - if (flags.dryrun) {
> + if (skipstream) {
> zcmd_free_nvlists(&zc);
> - return (recv_skip(hdl, infd, flags.byteswap));
> + return (recv_skip(hdl, infd, flags->byteswap));
> }
--
Pawel Jakub Dawidek http://www.wheelsystems.com
[email protected] http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
pgpOAMNOBTfLJ.pgp
Description: PGP signature
_______________________________________________ zfs-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/zfs-code
