From owner-svn-src-vendor@freebsd.org Fri Apr 14 17:27:10 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85137D3E548; Fri, 14 Apr 2017 17:27:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B6D076F; Fri, 14 Apr 2017 17:27:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3EHR9fW044188; Fri, 14 Apr 2017 17:27:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3EHR9Vt044187; Fri, 14 Apr 2017 17:27:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201704141727.v3EHR9Vt044187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 14 Apr 2017 17:27:09 +0000 (UTC) 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 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2017 17:27:10 -0000 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 Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Matthew Ahrens 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;