Illumos #1092: zfs refratio property
authorMatt Ahrens <Matt.Ahrens@delphix.com>
Tue, 26 Jul 2011 19:23:00 +0000 (12:23 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 1 Aug 2011 19:09:11 +0000 (12:09 -0700)
commitf5fc4acaa77e2c1782a9495bbf1a39884b4c3940
tree1d562e2608deaf93b5b65042f72e7e0f6b992750
parent6d974228ef05366c546bb04198dafcb38785c16d
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 <George.Wilson@delphix.com>
Reviewed by: Adam Leventhal <Adam.Leventhal@delphix.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Reviewed by: Mark Musante <Mark.Musante@oracle.com>
Reviewed by: Garrett D'Amore <garrett@nexenta.com>
Approved by: Garrett D'Amore <garrett@nexenta.com>

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 <behlendorf1@llnl.gov>
Issue #340
include/sys/fs/zfs.h
lib/libzfs/libzfs_dataset.c
man/man8/zfs.8
module/zcommon/zfs_prop.c
module/zfs/dsl_dataset.c