diff options
author | mm <mm@FreeBSD.org> | 2011-06-28 07:52:01 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-06-28 07:52:01 +0000 |
commit | 333e34b938a2b5e7b036e02b36408880b415109c (patch) | |
tree | 986e30a3129d0952da3c628d7c71135914303367 /sys/cddl/contrib/opensolaris/common | |
parent | 953bf4fcbd8cfe9a78938869f7f1178e80ac1da5 (diff) | |
download | FreeBSD-src-333e34b938a2b5e7b036e02b36408880b415109c.zip FreeBSD-src-333e34b938a2b5e7b036e02b36408880b415109c.tar.gz |
Add a new "REFCOMPRESSRATIO" property.
For snapshots, this is the same as COMPRESSRATIO, but for
filesystems/volumes, the COMPRESSRATIO is based on the data "USED" (ie,
includes blocks in children, but not blocks shared with the origin).
This is needed to figure out how much space a filesystem would use if it
were not compressed (ignoring snapshots).
Illumos-gate revision: 13387
Obtained from: Illumos (Feature #1092)
MFC after: 2 weeks
Diffstat (limited to 'sys/cddl/contrib/opensolaris/common')
-rw-r--r-- | sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c b/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c index 434b482..4fa75195 100644 --- a/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c +++ b/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -311,6 +312,9 @@ zfs_prop_init(void) zprop_register_number(ZFS_PROP_COMPRESSRATIO, "compressratio", 0, PROP_READONLY, ZFS_TYPE_DATASET, "<1.00x or higher if compressed>", "RATIO"); + zprop_register_number(ZFS_PROP_REFRATIO, "refcompressratio", 0, + PROP_READONLY, ZFS_TYPE_DATASET, + "<1.00x or higher if compressed>", "REFRATIO"); zprop_register_number(ZFS_PROP_VOLBLOCKSIZE, "volblocksize", ZVOL_DEFAULT_BLOCKSIZE, PROP_ONETIME, ZFS_TYPE_VOLUME, "512 to 128k, power of 2", "VOLBLOCK"); |