summaryrefslogtreecommitdiffstats
path: root/lib/libzfs
diff options
context:
space:
mode:
authorGeorge Melikov <[email protected]>2017-01-23 22:22:11 +0300
committerBrian Behlendorf <[email protected]>2017-01-23 11:22:11 -0800
commit3d43125fd465d869c813eb30a0233c0b6aae1209 (patch)
treef3dd7aad9d72c61b4d201d090e3558883c9685b6 /lib/libzfs
parentb87baa7ed2374bf8138f2c9f6b260498c0252eb6 (diff)
OpenZFS 7604 - if volblocksize property is the default, it displays as "-" rather than 8K
Authored by: Matthew Ahrens <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7604 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/586fd65 Closes #5629
Diffstat (limited to 'lib/libzfs')
-rw-r--r--lib/libzfs/libzfs_dataset.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 240728f96..ded3d61df 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -2101,9 +2101,12 @@ get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
/*
* If we tried to use a default value for a
* readonly property, it means that it was not
- * present.
+ * present. Note this only applies to "truly"
+ * readonly properties, not set-once properties
+ * like volblocksize.
*/
if (zfs_prop_readonly(prop) &&
+ !zfs_prop_setonce(prop) &&
*source != NULL && (*source)[0] == '\0') {
*source = NULL;
}