diff options
Diffstat (limited to 'usr/src/common/zfs')
| -rw-r--r-- | usr/src/common/zfs/zfs_prop.c | 19 | ||||
| -rw-r--r-- | usr/src/common/zfs/zfs_prop.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/usr/src/common/zfs/zfs_prop.c b/usr/src/common/zfs/zfs_prop.c index 5d45361eea..65155fec4a 100644 --- a/usr/src/common/zfs/zfs_prop.c +++ b/usr/src/common/zfs/zfs_prop.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. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -68,6 +69,7 @@ zfs_prop_init(void) { "fletcher2", ZIO_CHECKSUM_FLETCHER_2 }, { "fletcher4", ZIO_CHECKSUM_FLETCHER_4 }, { "sha256", ZIO_CHECKSUM_SHA256 }, + { "noparity", ZIO_CHECKSUM_NOPARITY }, { NULL } }; @@ -406,6 +408,23 @@ zfs_prop_delegatable(zfs_prop_t prop) return (pd->pd_attr != PROP_READONLY); } +boolean_t +zfs_prop_cacheable(zfs_prop_t prop) +{ + /* + * It'd be nice if each prop had a flags field which could have flag + * like PROP_CACHEABLE, but since zprop_attr_t is an enum and this + * setting is orthogonal to the concepts of PROP_READONLY, etc., we have + * this function. + */ + return (prop == ZFS_PROP_VERSION || + prop == ZFS_PROP_NORMALIZE || + prop == ZFS_PROP_UTF8ONLY || + prop == ZFS_PROP_CASE || + prop == ZFS_PROP_VOLSIZE || + prop == ZFS_PROP_VOLBLOCKSIZE); +} + /* * Given a zfs dataset property name, returns the corresponding property ID. */ diff --git a/usr/src/common/zfs/zfs_prop.h b/usr/src/common/zfs/zfs_prop.h index a63262311b..1796642c68 100644 --- a/usr/src/common/zfs/zfs_prop.h +++ b/usr/src/common/zfs/zfs_prop.h @@ -21,6 +21,7 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ #ifndef _ZFS_PROP_H @@ -86,6 +87,7 @@ typedef struct { void zfs_prop_init(void); zprop_type_t zfs_prop_get_type(zfs_prop_t); boolean_t zfs_prop_delegatable(zfs_prop_t prop); +boolean_t zfs_prop_cacheable(zfs_prop_t prop); zprop_desc_t *zfs_prop_get_table(void); /* |
