]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFV r336944: 9286 want refreservation=auto
authorAlexander Motin <mav@FreeBSD.org>
Mon, 30 Jul 2018 22:39:30 +0000 (22:39 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Mon, 30 Jul 2018 22:39:30 +0000 (22:39 +0000)
commit1960706625f2e2232e6db2ba507e943a2847ef54
tree0c4622c66aefa6029a9cd46413a93dc51d4dfdea
parenteb235f2f8e4ef1afe184452edde8cbe921b1208f
parent6f4662e46596a73523f38a4ea58ce348111642eb
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@1c10ae76c0cb31326c320e7cef1d3f24a1f47125

Reviewed by: Allan Jude <allanjude@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Mike Gerdts <mike.gerdts@joyent.com>
cddl/contrib/opensolaris/cmd/zfs/zfs.8
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c