HardenedBSD/src 1960706 (r336945)cddl/contrib/opensolaris/cmd/zfs zfs.8, cddl/contrib/opensolaris/lib/libzfs/common libzfs_dataset.c libzfs_util.c

MFV r336944: 9286 want refreservation=auto

When a ZFS volume is created with zfs create -V (but without -s), the
refreservation property is set to a value that is volsize plus the maximum
size of metadata. If refreservation is ever set to another value, it is
impossible to set it back to the automatically determined value. There are
other cases where refreservation may be wrong. These include receiving a
volume that was sent without properties and zfs clone.

We need:

zfs set refreservation=auto <volume>
zfs clone -o refreservation=auto <volume>

Each one would use the same function used by zfs create -V to determine the
proper value for refreservation.

illumos/illumos-gate at 1c10ae76c0cb31326c320e7cef1d3f24a1f47125

Reviewed by: Allan Jude <allanjude at freebsd.org>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: John Kennedy <john.kennedy at delphix.com>
Reviewed by: Andy Stormont <astormont at racktopsystems.com>
Approved by: Richard Lowe <richlowe at richlowe.net>
Author: Mike Gerdts <mike.gerdts at joyent.com>
DeltaFile
+78-2cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
+33-5cddl/contrib/opensolaris/cmd/zfs/zfs.8
+30-3cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
+141-103 files

UnifiedSplitRaw