Add more explicit warning about dedup being dropped
"has unsupported feature: [number]" seems reasonable when we can't know what the problem was, but with the send -D removal, we know what it was, and can explicitly tell people "don't do that; try this if you must". So let's. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12708
This commit is contained in:
parent
6d680e61ef
commit
a2ffc0e025
|
@ -5103,9 +5103,24 @@ zfs_receive_impl(libzfs_handle_t *hdl, const char *tosnap,
|
|||
|
||||
if (!DMU_STREAM_SUPPORTED(featureflags) ||
|
||||
(hdrtype != DMU_SUBSTREAM && hdrtype != DMU_COMPOUNDSTREAM)) {
|
||||
/*
|
||||
* Let's be explicit about this one, since rather than
|
||||
* being a new feature we can't know, it's an old
|
||||
* feature we dropped.
|
||||
*/
|
||||
if (featureflags & DMU_BACKUP_FEATURE_DEDUP) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"stream has unsupported feature, feature flags = %llx"),
|
||||
(unsigned long long)featureflags);
|
||||
"stream has deprecated feature: dedup, try "
|
||||
"'zstream redup [send in a file] | zfs recv "
|
||||
"[...]'"));
|
||||
} else {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"stream has unsupported feature, feature flags = "
|
||||
"%llx (unknown flags = %llx)"),
|
||||
(u_longlong_t)featureflags,
|
||||
(u_longlong_t)((featureflags) &
|
||||
~DMU_BACKUP_FEATURE_MASK));
|
||||
}
|
||||
return (zfs_error(hdl, EZFS_BADSTREAM, errbuf));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue