summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatt Ahrens <[email protected]>2011-07-26 12:23:00 -0700
committerBrian Behlendorf <[email protected]>2011-08-01 12:09:11 -0700
commitf5fc4acaa77e2c1782a9495bbf1a39884b4c3940 (patch)
tree1d562e2608deaf93b5b65042f72e7e0f6b992750 /lib
parent6d974228ef05366c546bb04198dafcb38785c16d (diff)
Illumos #1092: zfs refratio property
Add a "REFRATIO" property, which is the compression ratio based on data referenced. 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). Reviewed by: George Wilson <[email protected]> Reviewed by: Adam Leventhal <[email protected]> Reviewed by: Dan McDonald <[email protected]> Reviewed by: Richard Elling <[email protected]> Reviewed by: Mark Musante <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Approved by: Garrett D'Amore <[email protected]> References to Illumos issue and patch: - https://www.illumos.org/issues/1092 - https://github.com/illumos/illumos-gate/commit/187d6ac08a Signed-off-by: Brian Behlendorf <[email protected]> Issue #340
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_dataset.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 5f8847a93..996bae2d7 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
*/
#include <ctype.h>
@@ -2025,6 +2026,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
}
break;
+ case ZFS_PROP_REFRATIO:
case ZFS_PROP_COMPRESSRATIO:
if (get_numeric_property(zhp, prop, src, &source, &val) != 0)
return (-1);