Skip to content

Commit

Permalink
Fix missing ivset guid with resumed raw base recv
Browse files Browse the repository at this point in the history
This patch corrects a bug introduced in 61152d1. When
resuming a raw base receive, the dmu_recv code always sets
drc->drc_fromsnapobj to the object ID of the previous
snapshot. For incrementals, this is correct, but for base
sends, this should be left at 0. The presence of this ID
eventually allows a check to run which determines whether
or not the incoming stream and the previous snapshot have
matching IVset guids. This check fails becuase it is not
meant to run when there is no previous snapshot. When it
does fail, the user receives an error stating that the
incoming stream has the problem outlined in errata 4.

This patch corrects this issue by simply ensuring
drc->drc_fromsnapobj is left as 0 for base receives.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes openzfs#10234
Closes openzfs#10239
  • Loading branch information
Tom Caputi authored and tonyhutter committed Apr 29, 2020
1 parent e028b43 commit bfaf074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/dmu_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ dmu_recv_resume_begin_check(void *arg, dmu_tx_t *tx)
return (SET_ERROR(EINVAL));
}

if (ds->ds_prev != NULL)
if (ds->ds_prev != NULL && drrb->drr_fromguid != 0)
drc->drc_fromsnapobj = ds->ds_prev->ds_object;

dsl_dataset_rele_flags(ds, dsflags, FTAG);
Expand Down

0 comments on commit bfaf074

Please sign in to comment.