This patch fixes an incorrect error message that comes up when
doing a non-forcing, raw, incremental receive into a dataset
that has a newer snapshot than the "from" snapshot. In this
case, the current code prints a confusing message about an IVset
guid mismatch.
This functionality is supported by non-raw receives as an
undocumented feature, but was never supported by the raw receive
code. If this is desired in the future, we can probably figure
out a way to make it work.
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Issue #8758
Closes #8863
} else {
/*
* If we are not forcing, there must be no
- * changes since fromsnap.
+ * changes since fromsnap. Raw sends have an
+ * additional constraint that requires that
+ * no "noop" snapshots exist between fromsnap
+ * and tosnap for the IVset checking code to
+ * work properly.
*/
- if (dsl_dataset_modified_since_snap(ds, snap)) {
+ if (dsl_dataset_modified_since_snap(ds, snap) ||
+ (raw &&
+ dsl_dataset_phys(ds)->ds_prev_snap_obj !=
+ snap->ds_object)) {
dsl_dataset_rele(snap, FTAG);
return (SET_ERROR(ETXTBSY));
}