mirror_zfs/module/zcommon
Tim Chase 962d524212 Check the dataset type more rigorously when fetching properties.
When fetching property values of snapshots, a check against the head
dataset type must be performed.  Previously, this additional check was
performed only when fetching "version", "normalize", "utf8only" or "case".

This caused the ZPL properties "acltype", "exec", "devices", "nbmand",
"setuid" and "xattr" to be erroneously displayed with meaningless values
for snapshots of volumes.  It also did not allow for the display of
"volsize" of a snapshot of a volume.

This patch adds the headcheck flag paramater to zfs_prop_valid_for_type()
and zprop_valid_for_type() to indicate the check is being done
against a head dataset's type in order that properties valid only for
snapshots are handled correctly.  This allows the the head check in
get_numeric_property() to be performed when fetching a property for
a snapshot.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2265
2014-05-06 10:41:46 -07:00
..
Makefile.in Add script for builtin module building. 2012-07-26 13:45:09 -07:00
zfs_comutil.c Illumos #2882, #2883, #2900 2013-09-04 15:49:00 -07:00
zfs_deleg.c Illumos #278: get rid zfs of python and pyzfs dependencies 2011-08-01 12:09:36 -07:00
zfs_fletcher.c Add linux kernel module support 2010-08-31 13:41:58 -07:00
zfs_namecheck.c Add linux kernel module support 2010-08-31 13:41:58 -07:00
zfs_prop.c Check the dataset type more rigorously when fetching properties. 2014-05-06 10:41:46 -07:00
zfs_uio.c cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
zpool_prop.c Illumos #2619 and #2747 2013-01-08 10:35:35 -08:00
zprop_common.c Check the dataset type more rigorously when fetching properties. 2014-05-06 10:41:46 -07:00