diff options
author | LOLi <[email protected]> | 2017-09-12 20:33:22 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-09-12 11:33:22 -0700 |
commit | ded8f06a3cfee60b3a8ea5309e9c4d0e567ed3b5 (patch) | |
tree | 542c4084ec40c6dbdc531dd47dc9d33299a23a73 /lib/libzfs/libzfs_dataset.c | |
parent | d9549cba9640cd3b09d76b8cbd54387728b7be24 (diff) |
Relax (ref)reservation constraints on ZVOLs
This change allow (ref)reservation to be set larger than the current
ZVOL size: this is safe as we normally set refreservation > volsize
at ZVOL creation time when we account for metadata.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed by: Richard Elling <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #2468
Closes #6610
Diffstat (limited to 'lib/libzfs/libzfs_dataset.c')
-rw-r--r-- | lib/libzfs/libzfs_dataset.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index 76a166038..3cf470759 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -1451,25 +1451,11 @@ badlabel: * checks to enforce. */ if (type == ZFS_TYPE_VOLUME && zhp != NULL) { - uint64_t volsize = zfs_prop_get_int(zhp, - ZFS_PROP_VOLSIZE); uint64_t blocksize = zfs_prop_get_int(zhp, ZFS_PROP_VOLBLOCKSIZE); char buf[64]; switch (prop) { - case ZFS_PROP_RESERVATION: - case ZFS_PROP_REFRESERVATION: - if (intval > volsize) { - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "'%s' is greater than current " - "volume size"), propname); - (void) zfs_error(hdl, EZFS_BADPROP, - errbuf); - goto error; - } - break; - case ZFS_PROP_VOLSIZE: if (intval % blocksize != 0) { zfs_nicebytes(blocksize, buf, |