diff --git a/include/zfs_prop.h b/include/zfs_prop.h
index c7363f7015..dca537c376 100644
--- a/include/zfs_prop.h
+++ b/include/zfs_prop.h
@@ -76,10 +76,11 @@ typedef struct {
/* fs | vol | snap; or pool */
const char *pd_values; /* string telling acceptable values */
const char *pd_colname; /* column header for "zfs list" */
- boolean_t pd_rightalign; /* column alignment for "zfs list" */
- boolean_t pd_visible; /* do we list this property with the */
+ boolean_t pd_rightalign: 1; /* column alignment for "zfs list" */
+ boolean_t pd_visible: 1; /* do we list this property with the */
/* "zfs get" help message */
- boolean_t pd_zfs_mod_supported; /* supported by running zfs module */
+ boolean_t pd_zfs_mod_supported: 1; /* supported by running zfs module */
+ boolean_t pd_always_flex: 1; /* never fixed-width */
const zprop_index_t *pd_table; /* for index properties, a table */
/* defining the possible values */
size_t pd_table_size; /* number of entries in pd_table[] */
@@ -112,19 +113,20 @@ _ZFS_PROP_H zprop_desc_t *vdev_prop_get_table(void);
*/
_ZFS_PROP_H void zprop_register_impl(int, const char *, zprop_type_t, uint64_t,
const char *, zprop_attr_t, int, const char *, const char *,
- boolean_t, boolean_t, const zprop_index_t *,
+ boolean_t, boolean_t, boolean_t, const zprop_index_t *,
const struct zfs_mod_supported_features *);
_ZFS_PROP_H void zprop_register_string(int, const char *, const char *,
zprop_attr_t attr, int, const char *, const char *,
const struct zfs_mod_supported_features *);
_ZFS_PROP_H void zprop_register_number(int, const char *, uint64_t,
- zprop_attr_t, int, const char *, const char *,
+ zprop_attr_t, int, const char *, const char *, boolean_t,
const struct zfs_mod_supported_features *);
_ZFS_PROP_H void zprop_register_index(int, const char *, uint64_t, zprop_attr_t,
int, const char *, const char *, const zprop_index_t *,
const struct zfs_mod_supported_features *);
_ZFS_PROP_H void zprop_register_hidden(int, const char *, zprop_type_t,
- zprop_attr_t, int, const char *, const struct zfs_mod_supported_features *);
+ zprop_attr_t, int, const char *, boolean_t,
+ const struct zfs_mod_supported_features *);
/*
* Common routines for zfs and zpool property management
diff --git a/lib/libzfs/libzfs.abi b/lib/libzfs/libzfs.abi
index a34811b580..69931fda97 100644
--- a/lib/libzfs/libzfs.abi
+++ b/lib/libzfs/libzfs.abi
@@ -10,6 +10,7 @@
+
@@ -907,7 +908,7 @@
-
+
@@ -970,6 +971,11 @@
+
+
+
+
+
@@ -990,7 +996,7 @@
-
+
@@ -1015,11 +1021,6 @@
-
-
-
-
-
@@ -1092,6 +1093,11 @@
+
+
+
+
+
@@ -1112,7 +1118,7 @@
-
+
@@ -1137,11 +1143,6 @@
-
-
-
-
-
@@ -1182,6 +1183,12 @@
+
+
+
+
+
+
@@ -1206,12 +1213,6 @@
-
-
-
-
-
-
@@ -1854,8 +1855,8 @@
-
-
+
+
@@ -1953,7 +1954,7 @@
-
+
@@ -2488,7 +2489,7 @@
-
+
@@ -2519,16 +2520,19 @@
-
+
-
+
-
+
+
+
+
-
+
@@ -2798,6 +2802,7 @@
+
@@ -2821,6 +2826,7 @@
+
@@ -2843,6 +2849,7 @@
+
@@ -2991,6 +2998,7 @@
+
@@ -3360,13 +3368,13 @@
-
+
-
+
@@ -4081,9 +4089,6 @@
-
-
-
@@ -4096,24 +4101,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 3236ada257..0115a17e6f 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -2903,6 +2903,8 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
break;
case ZFS_PROP_GUID:
+ case ZFS_PROP_KEY_GUID:
+ case ZFS_PROP_IVSET_GUID:
case ZFS_PROP_CREATETXG:
case ZFS_PROP_OBJSETID:
case ZFS_PROP_PBKDF2_ITERS:
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c
index 7fafeae9e5..fe58221a02 100644
--- a/lib/libzfs/libzfs_pool.c
+++ b/lib/libzfs/libzfs_pool.c
@@ -347,6 +347,8 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf,
case ZPOOL_PROP_FREEING:
case ZPOOL_PROP_LEAKED:
case ZPOOL_PROP_ASHIFT:
+ case ZPOOL_PROP_MAXBLOCKSIZE:
+ case ZPOOL_PROP_MAXDNODESIZE:
if (literal)
(void) snprintf(buf, len, "%llu",
(u_longlong_t)intval);
@@ -5160,6 +5162,7 @@ zpool_get_vdev_prop_value(nvlist_t *nvprop, vdev_prop_t prop, char *prop_name,
case VDEV_PROP_ASIZE:
case VDEV_PROP_PSIZE:
case VDEV_PROP_SIZE:
+ case VDEV_PROP_BOOTSIZE:
case VDEV_PROP_ALLOCATED:
case VDEV_PROP_FREE:
case VDEV_PROP_READ_ERRORS:
diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c
index 895a86bb47..0d57350668 100644
--- a/module/zcommon/zfs_prop.c
+++ b/module/zcommon/zfs_prop.c
@@ -589,125 +589,132 @@ zfs_prop_init(void)
/* readonly number properties */
zprop_register_number(ZFS_PROP_USED, "used", 0, PROP_READONLY,
- ZFS_TYPE_DATASET, "", "USED", sfeatures);
+ ZFS_TYPE_DATASET, "", "USED", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_AVAILABLE, "available", 0, PROP_READONLY,
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "", "AVAIL",
- sfeatures);
+ B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_REFERENCED, "referenced", 0,
PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "",
- "REFER", sfeatures);
+ "REFER", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_COMPRESSRATIO, "compressratio", 0,
PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK,
- "<1.00x or higher if compressed>", "RATIO", sfeatures);
+ "<1.00x or higher if compressed>", "RATIO", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_REFRATIO, "refcompressratio", 0,
PROP_READONLY, ZFS_TYPE_DATASET,
- "<1.00x or higher if compressed>", "REFRATIO", sfeatures);
+ "<1.00x or higher if compressed>", "REFRATIO", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_VOLBLOCKSIZE, "volblocksize",
ZVOL_DEFAULT_BLOCKSIZE, PROP_ONETIME,
- ZFS_TYPE_VOLUME, "512 to 128k, power of 2", "VOLBLOCK", sfeatures);
+ ZFS_TYPE_VOLUME, "512 to 128k, power of 2", "VOLBLOCK", B_FALSE,
+ sfeatures);
zprop_register_number(ZFS_PROP_USEDSNAP, "usedbysnapshots", 0,
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "",
- "USEDSNAP", sfeatures);
+ "USEDSNAP", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_USEDDS, "usedbydataset", 0,
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "",
- "USEDDS", sfeatures);
+ "USEDDS", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_USEDCHILD, "usedbychildren", 0,
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "",
- "USEDCHILD", sfeatures);
+ "USEDCHILD", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_USEDREFRESERV, "usedbyrefreservation", 0,
PROP_READONLY,
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "", "USEDREFRESERV",
- sfeatures);
+ B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_USERREFS, "userrefs", 0, PROP_READONLY,
- ZFS_TYPE_SNAPSHOT, "", "USERREFS", sfeatures);
+ ZFS_TYPE_SNAPSHOT, "", "USERREFS", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_WRITTEN, "written", 0, PROP_READONLY,
- ZFS_TYPE_DATASET, "", "WRITTEN", sfeatures);
+ ZFS_TYPE_DATASET, "", "WRITTEN", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_LOGICALUSED, "logicalused", 0,
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "",
- "LUSED", sfeatures);
+ "LUSED", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_LOGICALREFERENCED, "logicalreferenced",
0, PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "",
- "LREFER", sfeatures);
+ "LREFER", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_FILESYSTEM_COUNT, "filesystem_count",
UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM,
- "", "FSCOUNT", sfeatures);
+ "", "FSCOUNT", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_SNAPSHOT_COUNT, "snapshot_count",
UINT64_MAX, PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
- "", "SSCOUNT", sfeatures);
+ "", "SSCOUNT", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_GUID, "guid", 0, PROP_READONLY,
ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "", "GUID",
- sfeatures);
+ B_TRUE, sfeatures);
zprop_register_number(ZFS_PROP_CREATETXG, "createtxg", 0, PROP_READONLY,
ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "", "CREATETXG",
- sfeatures);
+ B_TRUE, sfeatures);
zprop_register_number(ZFS_PROP_PBKDF2_ITERS, "pbkdf2iters",
0, PROP_ONETIME_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
- "", "PBKDF2ITERS", sfeatures);
+ "", "PBKDF2ITERS", B_TRUE, sfeatures);
zprop_register_number(ZFS_PROP_OBJSETID, "objsetid", 0,
- PROP_READONLY, ZFS_TYPE_DATASET, "", "OBJSETID", sfeatures);
+ PROP_READONLY, ZFS_TYPE_DATASET, "", "OBJSETID", B_TRUE,
+ sfeatures);
/* default number properties */
zprop_register_number(ZFS_PROP_QUOTA, "quota", 0, PROP_DEFAULT,
- ZFS_TYPE_FILESYSTEM, " | none", "QUOTA", sfeatures);
+ ZFS_TYPE_FILESYSTEM, " | none", "QUOTA", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_RESERVATION, "reservation", 0,
PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
- " | none", "RESERV", sfeatures);
+ " | none", "RESERV", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_VOLSIZE, "volsize", 0, PROP_DEFAULT,
ZFS_TYPE_SNAPSHOT | ZFS_TYPE_VOLUME, "", "VOLSIZE",
- sfeatures);
+ B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_REFQUOTA, "refquota", 0, PROP_DEFAULT,
- ZFS_TYPE_FILESYSTEM, " | none", "REFQUOTA", sfeatures);
+ ZFS_TYPE_FILESYSTEM, " | none", "REFQUOTA", B_FALSE,
+ sfeatures);
zprop_register_number(ZFS_PROP_REFRESERVATION, "refreservation", 0,
PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
- " | none", "REFRESERV", sfeatures);
+ " | none", "REFRESERV", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_FILESYSTEM_LIMIT, "filesystem_limit",
UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM,
- " | none", "FSLIMIT", sfeatures);
+ " | none", "FSLIMIT", B_FALSE, sfeatures);
zprop_register_number(ZFS_PROP_SNAPSHOT_LIMIT, "snapshot_limit",
UINT64_MAX, PROP_DEFAULT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME,
- " | none", "SSLIMIT", sfeatures);
+ " | none", "SSLIMIT", B_FALSE, sfeatures);
/* inherit number properties */
zprop_register_number(ZFS_PROP_RECORDSIZE, "recordsize",
SPA_OLD_MAXBLOCKSIZE, PROP_INHERIT,
- ZFS_TYPE_FILESYSTEM, "512 to 1M, power of 2", "RECSIZE", sfeatures);
+ ZFS_TYPE_FILESYSTEM, "512 to 1M, power of 2", "RECSIZE", B_FALSE,
+ sfeatures);
zprop_register_number(ZFS_PROP_SPECIAL_SMALL_BLOCKS,
"special_small_blocks", 0, PROP_INHERIT, ZFS_TYPE_FILESYSTEM,
- "zero or 512 to 1M, power of 2", "SPECIAL_SMALL_BLOCKS", sfeatures);
+ "zero or 512 to 1M, power of 2", "SPECIAL_SMALL_BLOCKS", B_FALSE,
+ sfeatures);
/* hidden properties */
zprop_register_hidden(ZFS_PROP_NUMCLONES, "numclones", PROP_TYPE_NUMBER,
- PROP_READONLY, ZFS_TYPE_SNAPSHOT, "NUMCLONES", sfeatures);
+ PROP_READONLY, ZFS_TYPE_SNAPSHOT, "NUMCLONES", B_FALSE, sfeatures);
zprop_register_hidden(ZFS_PROP_NAME, "name", PROP_TYPE_STRING,
PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "NAME",
- sfeatures);
+ B_TRUE, sfeatures);
zprop_register_hidden(ZFS_PROP_ISCSIOPTIONS, "iscsioptions",
PROP_TYPE_STRING, PROP_INHERIT, ZFS_TYPE_VOLUME, "ISCSIOPTIONS",
- sfeatures);
+ B_TRUE, sfeatures);
zprop_register_hidden(ZFS_PROP_STMF_SHAREINFO, "stmf_sbd_lu",
PROP_TYPE_STRING, PROP_INHERIT, ZFS_TYPE_VOLUME,
- "STMF_SBD_LU", sfeatures);
+ "STMF_SBD_LU", B_TRUE, sfeatures);
zprop_register_hidden(ZFS_PROP_USERACCOUNTING, "useraccounting",
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET,
- "USERACCOUNTING", sfeatures);
+ "USERACCOUNTING", B_FALSE, sfeatures);
zprop_register_hidden(ZFS_PROP_UNIQUE, "unique", PROP_TYPE_NUMBER,
- PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE", sfeatures);
+ PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE", B_FALSE, sfeatures);
zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent",
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT",
- sfeatures);
+ B_FALSE, sfeatures);
zprop_register_hidden(ZFS_PROP_IVSET_GUID, "ivsetguid",
PROP_TYPE_NUMBER, PROP_READONLY,
- ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "IVSETGUID", sfeatures);
+ ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK, "IVSETGUID", B_TRUE,
+ sfeatures);
zprop_register_hidden(ZFS_PROP_PREV_SNAP, "prevsnap", PROP_TYPE_STRING,
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "PREVSNAP",
- sfeatures);
+ B_TRUE, sfeatures);
zprop_register_hidden(ZFS_PROP_PBKDF2_SALT, "pbkdf2salt",
PROP_TYPE_NUMBER, PROP_ONETIME_DEFAULT,
- ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "PBKDF2SALT", sfeatures);
+ ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "PBKDF2SALT", B_FALSE,
+ sfeatures);
zprop_register_hidden(ZFS_PROP_KEY_GUID, "keyguid", PROP_TYPE_NUMBER,
- PROP_READONLY, ZFS_TYPE_DATASET, "KEYGUID", sfeatures);
+ PROP_READONLY, ZFS_TYPE_DATASET, "KEYGUID", B_TRUE, sfeatures);
zprop_register_hidden(ZFS_PROP_REDACTED, "redacted", PROP_TYPE_NUMBER,
- PROP_READONLY, ZFS_TYPE_DATASET, "REDACTED", sfeatures);
+ PROP_READONLY, ZFS_TYPE_DATASET, "REDACTED", B_FALSE, sfeatures);
/*
* Properties that are obsolete and not used. These are retained so
@@ -715,12 +722,13 @@ zfs_prop_init(void)
* have NULL pointers in the zfs_prop_table[].
*/
zprop_register_hidden(ZFS_PROP_REMAPTXG, "remaptxg", PROP_TYPE_NUMBER,
- PROP_READONLY, ZFS_TYPE_DATASET, "REMAPTXG", sfeatures);
+ PROP_READONLY, ZFS_TYPE_DATASET, "REMAPTXG", B_FALSE, sfeatures);
/* oddball properties */
+ /* 'creation' is a number but displayed as human-readable => flex */
zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0,
NULL, PROP_READONLY, ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK,
- "", "CREATION", B_FALSE, B_TRUE, NULL, sfeatures);
+ "", "CREATION", B_FALSE, B_TRUE, B_TRUE, NULL, sfeatures);
zfs_mod_list_supported_free(sfeatures);
}
diff --git a/module/zcommon/zpool_prop.c b/module/zcommon/zpool_prop.c
index 44bfe4add2..853476a1fc 100644
--- a/module/zcommon/zpool_prop.c
+++ b/module/zcommon/zpool_prop.c
@@ -85,39 +85,45 @@ zpool_prop_init(void)
/* readonly number properties */
zprop_register_number(ZPOOL_PROP_SIZE, "size", 0, PROP_READONLY,
- ZFS_TYPE_POOL, "", "SIZE", sfeatures);
+ ZFS_TYPE_POOL, "", "SIZE", B_FALSE, sfeatures);
zprop_register_number(ZPOOL_PROP_FREE, "free", 0, PROP_READONLY,
- ZFS_TYPE_POOL, "", "FREE", sfeatures);
+ ZFS_TYPE_POOL, "", "FREE", B_FALSE, sfeatures);
zprop_register_number(ZPOOL_PROP_FREEING, "freeing", 0, PROP_READONLY,
- ZFS_TYPE_POOL, "", "FREEING", sfeatures);
+ ZFS_TYPE_POOL, "", "FREEING", B_FALSE, sfeatures);
zprop_register_number(ZPOOL_PROP_CHECKPOINT, "checkpoint", 0,
- PROP_READONLY, ZFS_TYPE_POOL, "", "CKPOINT", sfeatures);
+ PROP_READONLY, ZFS_TYPE_POOL, "", "CKPOINT", B_FALSE,
+ sfeatures);
zprop_register_number(ZPOOL_PROP_LEAKED, "leaked", 0, PROP_READONLY,
- ZFS_TYPE_POOL, "", "LEAKED", sfeatures);
+ ZFS_TYPE_POOL, "", "LEAKED", B_FALSE, sfeatures);
zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0,
- PROP_READONLY, ZFS_TYPE_POOL, "", "ALLOC", sfeatures);
+ PROP_READONLY, ZFS_TYPE_POOL, "", "ALLOC", B_FALSE,
+ sfeatures);
zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0,
- PROP_READONLY, ZFS_TYPE_POOL, "", "EXPANDSZ", sfeatures);
+ PROP_READONLY, ZFS_TYPE_POOL, "", "EXPANDSZ", B_FALSE,
+ sfeatures);
zprop_register_number(ZPOOL_PROP_FRAGMENTATION, "fragmentation", 0,
- PROP_READONLY, ZFS_TYPE_POOL, "", "FRAG", sfeatures);
+ PROP_READONLY, ZFS_TYPE_POOL, "", "FRAG", B_FALSE,
+ sfeatures);
zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
- ZFS_TYPE_POOL, "", "CAP", sfeatures);
+ ZFS_TYPE_POOL, "", "CAP", B_FALSE, sfeatures);
zprop_register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY,
- ZFS_TYPE_POOL, "", "GUID", sfeatures);
+ ZFS_TYPE_POOL, "", "GUID", B_TRUE, sfeatures);
zprop_register_number(ZPOOL_PROP_LOAD_GUID, "load_guid", 0,
PROP_READONLY, ZFS_TYPE_POOL, "", "LOAD_GUID",
- sfeatures);
+ B_TRUE, sfeatures);
zprop_register_number(ZPOOL_PROP_HEALTH, "health", 0, PROP_READONLY,
- ZFS_TYPE_POOL, "", "HEALTH", sfeatures);
+ ZFS_TYPE_POOL, "", "HEALTH", B_FALSE, sfeatures);
zprop_register_number(ZPOOL_PROP_DEDUPRATIO, "dedupratio", 0,
PROP_READONLY, ZFS_TYPE_POOL, "<1.00x or higher if deduped>",
- "DEDUP", sfeatures);
+ "DEDUP", B_FALSE, sfeatures);
/* default number properties */
zprop_register_number(ZPOOL_PROP_VERSION, "version", SPA_VERSION,
- PROP_DEFAULT, ZFS_TYPE_POOL, "", "VERSION", sfeatures);
+ PROP_DEFAULT, ZFS_TYPE_POOL, "", "VERSION", B_FALSE,
+ sfeatures);
zprop_register_number(ZPOOL_PROP_ASHIFT, "ashift", 0, PROP_DEFAULT,
- ZFS_TYPE_POOL, "", "ASHIFT", sfeatures);
+ ZFS_TYPE_POOL, "", "ASHIFT", B_FALSE,
+ sfeatures);
/* default index (boolean) properties */
zprop_register_index(ZPOOL_PROP_DELEGATION, "delegation", 1,
@@ -150,18 +156,18 @@ zpool_prop_init(void)
/* hidden properties */
zprop_register_hidden(ZPOOL_PROP_NAME, "name", PROP_TYPE_STRING,
- PROP_READONLY, ZFS_TYPE_POOL, "NAME", sfeatures);
+ PROP_READONLY, ZFS_TYPE_POOL, "NAME", B_TRUE, sfeatures);
zprop_register_hidden(ZPOOL_PROP_MAXBLOCKSIZE, "maxblocksize",
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_POOL, "MAXBLOCKSIZE",
- sfeatures);
+ B_FALSE, sfeatures);
zprop_register_hidden(ZPOOL_PROP_TNAME, "tname", PROP_TYPE_STRING,
- PROP_ONETIME, ZFS_TYPE_POOL, "TNAME", sfeatures);
+ PROP_ONETIME, ZFS_TYPE_POOL, "TNAME", B_TRUE, sfeatures);
zprop_register_hidden(ZPOOL_PROP_MAXDNODESIZE, "maxdnodesize",
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_POOL, "MAXDNODESIZE",
- sfeatures);
+ B_FALSE, sfeatures);
zprop_register_hidden(ZPOOL_PROP_DEDUPDITTO, "dedupditto",
PROP_TYPE_NUMBER, PROP_DEFAULT, ZFS_TYPE_POOL, "DEDUPDITTO",
- sfeatures);
+ B_FALSE, sfeatures);
zfs_mod_list_supported_free(sfeatures);
}
@@ -323,67 +329,85 @@ vdev_prop_init(void)
/* readonly number properties */
zprop_register_number(VDEV_PROP_SIZE, "size", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "SIZE", sfeatures);
+ ZFS_TYPE_VDEV, "", "SIZE", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_FREE, "free", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "FREE", sfeatures);
+ ZFS_TYPE_VDEV, "", "FREE", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_ALLOCATED, "allocated", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "ALLOC", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "ALLOC", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_EXPANDSZ, "expandsize", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "EXPANDSZ", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "EXPANDSZ", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_FRAGMENTATION, "fragmentation", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "FRAG", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "FRAG", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "CAP", sfeatures);
+ ZFS_TYPE_VDEV, "", "CAP", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_GUID, "guid", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "GUID", sfeatures);
+ ZFS_TYPE_VDEV, "", "GUID", B_TRUE, sfeatures);
zprop_register_number(VDEV_PROP_STATE, "state", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "STATE", sfeatures);
+ ZFS_TYPE_VDEV, "", "STATE", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_BOOTSIZE, "bootsize", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "BOOTSIZE", sfeatures);
+ ZFS_TYPE_VDEV, "", "BOOTSIZE", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_ASIZE, "asize", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "ASIZE", sfeatures);
+ ZFS_TYPE_VDEV, "", "ASIZE", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_PSIZE, "psize", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "PSIZE", sfeatures);
+ ZFS_TYPE_VDEV, "", "PSIZE", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_ASHIFT, "ashift", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "ASHIFT", sfeatures);
+ ZFS_TYPE_VDEV, "", "ASHIFT", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_PARITY, "parity", 0, PROP_READONLY,
- ZFS_TYPE_VDEV, "", "PARITY", sfeatures);
+ ZFS_TYPE_VDEV, "", "PARITY", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_NUMCHILDREN, "numchildren", 0,
PROP_READONLY, ZFS_TYPE_VDEV, "", "NUMCHILD",
- sfeatures);
+ B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_READ_ERRORS, "read_errors", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "RDERR", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "RDERR", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_WRITE_ERRORS, "write_errors", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "WRERR", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "WRERR", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_CHECKSUM_ERRORS, "checksum_errors", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "CKERR", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "CKERR", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_INITIALIZE_ERRORS,
"initialize_errors", 0, PROP_READONLY, ZFS_TYPE_VDEV, "",
- "INITERR", sfeatures);
+ "INITERR", B_FALSE, sfeatures);
zprop_register_number(VDEV_PROP_OPS_NULL, "null_ops", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "NULLOP", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "NULLOP", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_OPS_READ, "read_ops", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "READOP", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "READOP", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_OPS_WRITE, "write_ops", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "WRITEOP", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "WRITEOP", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_OPS_FREE, "free_ops", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "FREEOP", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "FREEOP", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_OPS_CLAIM, "claim_ops", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "CLAIMOP", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "CLAIMOP", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_OPS_TRIM, "trim_ops", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "TRIMOP", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "TRIMOP", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_BYTES_NULL, "null_bytes", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "NULLBYTE", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "NULLBYTE", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_BYTES_READ, "read_bytes", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "READBYTE", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "READBYTE", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_BYTES_WRITE, "write_bytes", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "WRITEBYTE", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "WRITEBYTE", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_BYTES_FREE, "free_bytes", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "FREEBYTE", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "FREEBYTE", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_BYTES_CLAIM, "claim_bytes", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "CLAIMBYTE", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "CLAIMBYTE", B_FALSE,
+ sfeatures);
zprop_register_number(VDEV_PROP_BYTES_TRIM, "trim_bytes", 0,
- PROP_READONLY, ZFS_TYPE_VDEV, "", "TRIMBYTE", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "", "TRIMBYTE", B_FALSE,
+ sfeatures);
/* default numeric properties */
@@ -399,7 +423,7 @@ vdev_prop_init(void)
/* hidden properties */
zprop_register_hidden(VDEV_PROP_NAME, "name", PROP_TYPE_STRING,
- PROP_READONLY, ZFS_TYPE_VDEV, "NAME", sfeatures);
+ PROP_READONLY, ZFS_TYPE_VDEV, "NAME", B_TRUE, sfeatures);
zfs_mod_list_supported_free(sfeatures);
}
diff --git a/module/zcommon/zprop_common.c b/module/zcommon/zprop_common.c
index d7a3ff6082..0f49687757 100644
--- a/module/zcommon/zprop_common.c
+++ b/module/zcommon/zprop_common.c
@@ -97,7 +97,8 @@ void
zprop_register_impl(int prop, const char *name, zprop_type_t type,
uint64_t numdefault, const char *strdefault, zprop_attr_t attr,
int objset_types, const char *values, const char *colname,
- boolean_t rightalign, boolean_t visible, const zprop_index_t *idx_tbl,
+ boolean_t rightalign, boolean_t visible, boolean_t flex,
+ const zprop_index_t *idx_tbl,
const struct zfs_mod_supported_features *sfeatures)
{
zprop_desc_t *prop_tbl = zprop_get_proptable(objset_types);
@@ -122,6 +123,7 @@ zprop_register_impl(int prop, const char *name, zprop_type_t type,
pd->pd_visible = visible;
pd->pd_zfs_mod_supported =
zfs_mod_supported_prop(name, objset_types, sfeatures);
+ pd->pd_always_flex = flex;
pd->pd_table = idx_tbl;
pd->pd_table_size = 0;
while (idx_tbl && (idx_tbl++)->pi_name != NULL)
@@ -134,17 +136,20 @@ zprop_register_string(int prop, const char *name, const char *def,
const char *colname, const struct zfs_mod_supported_features *sfeatures)
{
zprop_register_impl(prop, name, PROP_TYPE_STRING, 0, def, attr,
- objset_types, values, colname, B_FALSE, B_TRUE, NULL, sfeatures);
+ objset_types, values, colname, B_FALSE, B_TRUE, B_FALSE, NULL,
+ sfeatures);
}
void
zprop_register_number(int prop, const char *name, uint64_t def,
zprop_attr_t attr, int objset_types, const char *values,
- const char *colname, const struct zfs_mod_supported_features *sfeatures)
+ const char *colname, boolean_t flex,
+ const struct zfs_mod_supported_features *sfeatures)
{
zprop_register_impl(prop, name, PROP_TYPE_NUMBER, def, NULL, attr,
- objset_types, values, colname, B_TRUE, B_TRUE, NULL, sfeatures);
+ objset_types, values, colname, B_TRUE, B_TRUE, flex, NULL,
+ sfeatures);
}
void
@@ -154,17 +159,18 @@ zprop_register_index(int prop, const char *name, uint64_t def,
const struct zfs_mod_supported_features *sfeatures)
{
zprop_register_impl(prop, name, PROP_TYPE_INDEX, def, NULL, attr,
- objset_types, values, colname, B_FALSE, B_TRUE, idx_tbl, sfeatures);
+ objset_types, values, colname, B_FALSE, B_TRUE, B_FALSE, idx_tbl,
+ sfeatures);
}
void
zprop_register_hidden(int prop, const char *name, zprop_type_t type,
- zprop_attr_t attr, int objset_types, const char *colname,
+ zprop_attr_t attr, int objset_types, const char *colname, boolean_t flex,
const struct zfs_mod_supported_features *sfeatures)
{
zprop_register_impl(prop, name, type, 0, NULL, attr,
objset_types, NULL, colname,
- type == PROP_TYPE_NUMBER, B_FALSE, NULL, sfeatures);
+ type == PROP_TYPE_NUMBER, B_FALSE, flex, NULL, sfeatures);
}
@@ -440,7 +446,7 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type)
if (type != ZFS_TYPE_POOL && type != ZFS_TYPE_VDEV)
type = ZFS_TYPE_FILESYSTEM;
- *fixed = B_TRUE;
+ *fixed = !pd->pd_always_flex;
/*
* Start with the width of the column name.
@@ -459,12 +465,6 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type)
*/
if (ret < 5)
ret = 5;
- /*
- * 'creation' is handled specially because it's a number
- * internally, but displayed as a date string.
- */
- if (type == ZFS_TYPE_FILESYSTEM && prop == ZFS_PROP_CREATION)
- *fixed = B_FALSE;
/*
* 'health' is handled specially because it's a number
* internally, but displayed as a fixed 8 character string.
@@ -482,7 +482,6 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type)
break;
case PROP_TYPE_STRING:
- *fixed = B_FALSE;
break;
}