From 95f7107d15703b79ba562e4183778aa5d8cd9c40 Mon Sep 17 00:00:00 2001 From: "Eric A. Borisch" Date: Tue, 11 Jul 2023 22:39:58 -0500 Subject: [PATCH] recv: don't complain about 'no-op' -x options. When a recursive send is performed that contains volumes (to backup a system that has VMs run from the main zpool, for example), the destination receive run with '-x mountpoint' will complain with Warning: backup/path/to/volume: property 'mountpoint' does not apply to datasets of this type. This change disables these warnings for mis-matched (could not be in send stream) options. --- lib/libzfs/libzfs_sendrecv.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 6d29d798c6..2862b427b4 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -4218,16 +4218,14 @@ zfs_setup_cmdline_props(libzfs_handle_t *hdl, zfs_type_t type, */ if (!zfs_prop_valid_for_type(prop, type, B_FALSE) && !zfs_prop_user(name)) { - if (type == ZFS_TYPE_VOLUME && - strncmp("mountpoint", name, 10) == 0) { - // Don't complain about '-x mountpoint' - // applied to a volume. - continue; - } - (void) fprintf(stderr, dgettext(TEXT_DOMAIN, - "Warning: %s: property '%s' does not " - "apply to datasets of this type\n"), - fsname, name); + /* + * These are non-user properties that are not + * supported for this particular type of + * destination. These could not have been set + * on the source, so there is no reason to + * complain about eliding them (-x) during the + * receive. + */ continue; } /*