summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2020-04-24 22:00:32 -0400
committerGitHub <[email protected]>2020-04-24 19:00:32 -0700
commitaa646323dbb61a2c3224b03c17732bd19fc50758 (patch)
treeb2b2f7ea36ff511b021c029afff4b672b6f9ccb9
parent6de3e59bdd70fc9db5d3ef2549a49264845c937e (diff)
Fix missing ivset guid with resumed raw base recv
This patch corrects a bug introduced in 61152d1069. 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 <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #10234 Closes #10239
-rw-r--r--module/zfs/dmu_recv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/dmu_recv.c b/module/zfs/dmu_recv.c
index 817c85b93..aaeaa4c34 100644
--- a/module/zfs/dmu_recv.c
+++ b/module/zfs/dmu_recv.c
@@ -1013,7 +1013,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;
/*