Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2017 17:27:09 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r316877 - vendor/illumos/dist/lib/libzfs/common
Message-ID:  <201704141727.v3EHR9Vt044187@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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@delphix.com>
  Reviewed by: George Wilson <george.wilson@delphix.com>
  Approved by: Robert Mustacchi <rm@joyent.com>
  Author: Matthew Ahrens <mahrens@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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704141727.v3EHR9Vt044187>