Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate deduplicated send streams #10117

Merged
merged 1 commit into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cmd/zfs/zfs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4328,6 +4328,16 @@ zfs_do_send(int argc, char **argv)
}
}

if (flags.dedup) {
(void) fprintf(stderr,
gettext("WARNING: deduplicated send is "
"deprecated, and will be removed in a\n"
"future release. (In the future, the flag will be "
"accepted, but a\n"
"regular, non-deduplicated stream will be "
"generated.)\n\n"));
}

if (flags.parsable && flags.verbosity == 0)
flags.verbosity = 1;

Expand Down
1 change: 1 addition & 0 deletions include/libzfs_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ struct libzfs_handle {
int libzfs_pool_iter;
char libzfs_chassis_id[256];
boolean_t libzfs_prop_debug;
boolean_t libzfs_dedup_warning_printed;
};

#define ZFSSHARE_MISS 0x01 /* Didn't find entry in cache */
Expand Down
20 changes: 20 additions & 0 deletions lib/libzfs/libzfs_sendrecv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4699,6 +4699,26 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
(void) printf("found clone origin %s\n", origin);
}

if (!hdl->libzfs_dedup_warning_printed &&
(DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) &
DMU_BACKUP_FEATURE_DEDUP)) {
(void) fprintf(stderr,
gettext("WARNING: This is a deduplicated send stream. "
"The ability to send and\n"
"receive deduplicated send streams is deprecated. "
"In the future, the\n"
"ability to receive a deduplicated send stream with "
"\"zfs receive\" will be\n"
"removed. However, in the future, a utility will be "
"provided to convert a\n"
"deduplicated send stream to a regular "
"(non-deduplicated) stream. This\n"
"future utility will require that the send stream be "
"located in a\n"
"seek-able file, rather than provided by a pipe.\n\n"));
hdl->libzfs_dedup_warning_printed = B_TRUE;
}

boolean_t resuming = DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) &
DMU_BACKUP_FEATURE_RESUMING;
boolean_t raw = DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) &
Expand Down
12 changes: 12 additions & 0 deletions man/man8/zfs-receive.8
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ destroyed by using the
.Nm zfs Cm destroy Fl d
command.
.Pp
Deduplicated send streams can be generated by using the
.Nm zfs Cm send Fl D
command.
\fBThe ability to send and receive deduplicated send streams is deprecated.\fR
In the future, the ability to receive a deduplicated send stream with
.Nm zfs Cm receive
will be removed.
However, in the future, a utility will be provided to convert a
deduplicated send stream to a regular (non-deduplicated) stream.
This future utility will require that the send stream be located in a
seek-able file, rather than provided by a pipe.
.Pp
If
.Fl o Em property Ns = Ns Ar value
or
Expand Down
3 changes: 3 additions & 0 deletions man/man8/zfs-send.8
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ By default, a full stream is generated.
.Bl -tag -width "-D"
.It Fl D, -dedup
Generate a deduplicated stream.
\fBDeduplicated send is deprecated and will be removed in a future release.\fR
(In the future, the flag will be accepted but a regular, non-deduplicated
stream will be generated.)
Blocks which would have been sent multiple times in the send stream will only be
sent once.
The receiving system must also support this feature to receive a deduplicated
Expand Down