]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFV r316877: 7571 non-present readonly numeric ZFS props do not have default value
authorAndriy Gapon <avg@FreeBSD.org>
Fri, 6 Oct 2017 08:10:54 +0000 (08:10 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Fri, 6 Oct 2017 08:10:54 +0000 (08:10 +0000)
commitf079bf7ce3eca371002b93556f5ace26bbb89ca6
tree5889ba795f9eccda2bb361da9c2d9c2019b5e535
parentf51efc68f6308b130d1fd7569697cca84be1d41c
parentaad99e99a3478cf9aca895a2c669984c3abe27ad
MFV r316877: 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>

MFC after: 3 weeks
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c