From 4d86c0eab246bdfddc2dd52410ba808433bd6266 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Mon, 28 Nov 2016 19:45:23 -0800 Subject: [PATCH] 7604 if volblocksize property is the default, it displays as "-" rather than 8K Reviewed by: Pavel Zakharov Reviewed by: Paul Dagnelie Reviewed by: John Kennedy Reviewed by: George Wilson Approved by: Robert Mustacchi --- usr/src/lib/libzfs/common/libzfs_dataset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/src/lib/libzfs/common/libzfs_dataset.c b/usr/src/lib/libzfs/common/libzfs_dataset.c index 32a8dbf682..a01d29e8c1 100644 --- a/usr/src/lib/libzfs/common/libzfs_dataset.c +++ b/usr/src/lib/libzfs/common/libzfs_dataset.c @@ -2125,9 +2125,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; return (-1); -- 2.11.4.GIT