svn commit: r316877 - vendor/illumos/dist/lib/libzfs/common
Andriy Gapon
avg at FreeBSD.org
Fri Apr 14 17:27:10 UTC 2017
Author: avg
Date: Fri Apr 14 17:27:09 2017
New Revision: 316877
URL: https://svnweb.freebsd.org/changeset/base/316877
Log:
7571 non-present readonly numeric ZFS props do not have default value
illumos/illumos-gate at ad2760acbd9c3b479bf632f05c6f03d89830799d
https://github.com/illumos/illumos-gate/commit/ad2760acbd9c3b479bf632f05c6f03d89830799d
https://www.illumos.org/issues/7571
ZFS displays the default value for non-present readonly numeric (and index)
properties. However, these properties default values are not meaningful.
Instead, we should display a "-", indicating that they are not present. For
example, on a version-12 pool, the usedby* properties are not available, but
they show up as the incorrect value "0":
1. zfs get all test12
...
test12 usedbysnapshots 0 -
test12 usedbydataset 0 -
test12 usedbychildren 0 -
test12 usedbyrefreservation 0 -
We will be introducing more sometimes-present numeric readonly properties, so
it would be nice to fix this.
Reviewed by: Dan Kimmel <dan.kimmel at delphix.com>
Reviewed by: George Wilson <george.wilson at delphix.com>
Approved by: Robert Mustacchi <rm at joyent.com>
Author: Matthew Ahrens <mahrens at delphix.com>
Modified:
vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c
Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c
==============================================================================
--- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Fri Apr 14 17:24:22 2017 (r316876)
+++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Fri Apr 14 17:27:09 2017 (r316877)
@@ -22,7 +22,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
- * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2016 by Delphix. All rights reserved.
* Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved.
* Copyright (c) 2011-2012 Pawel Jakub Dawidek. All rights reserved.
* Copyright (c) 2013 Martin Matuska. All rights reserved.
@@ -2038,6 +2038,7 @@ get_numeric_property(zfs_handle_t *zhp,
if (zfs_prop_readonly(prop) &&
*source != NULL && (*source)[0] == '\0') {
*source = NULL;
+ return (-1);
}
break;
More information about the svn-src-vendor
mailing list