From 3d43125fd465d869c813eb30a0233c0b6aae1209 Mon Sep 17 00:00:00 2001 From: George Melikov Date: Mon, 23 Jan 2017 22:22:11 +0300 Subject: OpenZFS 7604 - if volblocksize property is the default, it displays as "-" rather than 8K Authored by: Matthew Ahrens Reviewed by: Pavel Zakharov Reviewed by: Paul Dagnelie Reviewed by: John Kennedy Reviewed by: George Wilson Reviewed-by: Brian Behlendorf Ported-by: George Melikov OpenZFS-issue: https://www.illumos.org/issues/7604 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/586fd65 Closes #5629 --- lib/libzfs/libzfs_dataset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3