diff options
author | ilovezfs <[email protected]> | 2014-09-04 23:06:55 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-09-05 09:19:01 -0700 |
commit | 1ca56e603395b2d84c8043d5ff18f2082f57e6f1 (patch) | |
tree | 2b51a9d74c3fb69b6f22c466cb2346155c1b498e /module/zfs/zpl_xattr.c | |
parent | f38dfec3fd3757fd02d8c7bb46fecdfc427678ce (diff) |
Fragmentation should display as '-' if spacemap_histogram=disabled
When com.delphix:spacemap_histogram is disabled, the value of
fragmentation was printing as 18446744073709551615 (UINT64_MAX),
when it should print as '-'.
The issue was caused by a small mistake during the merge of
"4980 metaslabs should have a fragmentation metric."
upstream: https://github.com/illumos/illumos-gate/commit/2e4c998
ZoL: https://github.com/zfsonlinux/zfs/commit/f3a7f66
The problem is in zpool_get_prop_literal, where the handling of the
pool property ZPOOL_PROP_FRAGMENTATION was added to wrong the
section. In particular, ZPOOL_PROP_FRAGMENTATION should not be in
the section where zpool_get_state(zhp) == POOL_STATE_UNAVAIL, but
lower down after it's already been determined that the pool is in
fact available, which is where upstream illumos correctly has had
it.
Thanks to lundman for helping to track down this bug.
Signed-off-by: Jorgen Lundman <[email protected]>
Signed-off-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2664
Diffstat (limited to 'module/zfs/zpl_xattr.c')
0 files changed, 0 insertions, 0 deletions