diff options
author | delphij <delphij@FreeBSD.org> | 2014-07-26 10:20:48 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-07-26 10:20:48 +0000 |
commit | 0f4faf42cbb855fd26557197bdcea66a237af96c (patch) | |
tree | 5cafe8ee4c6165148ca59e000281c72b1f70ed51 /cddl/contrib/opensolaris/lib | |
parent | 381cd3e0c871457c04eae714342736bdacf9db0e (diff) | |
download | FreeBSD-src-0f4faf42cbb855fd26557197bdcea66a237af96c.zip FreeBSD-src-0f4faf42cbb855fd26557197bdcea66a237af96c.tar.gz |
MFV r269010:
Import Illumos changes to address the following Illumos issues:
4976 zfs should only avoid writing to a failing non-redundant
top-level vdev
4978 ztest fails in get_metaslab_refcount()
4979 extend free space histogram to device and pool
4980 metaslabs should have a fragmentation metric
4981 remove fragmented ops vector from block allocator
4982 space_map object should proactively upgrade when feature
is enabled
4984 device selection should use fragmentation metric
MFC after: 2 weeks
Diffstat (limited to 'cddl/contrib/opensolaris/lib')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c index f6e84f8..30b2d87 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c @@ -322,6 +322,14 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len, (u_longlong_t)intval); } break; + case ZPOOL_PROP_FRAGMENTATION: + if (intval == UINT64_MAX) { + (void) strlcpy(buf, "-", len); + } else { + (void) snprintf(buf, len, "%llu%%", + (u_longlong_t)intval); + } + break; case ZPOOL_PROP_DEDUPRATIO: (void) snprintf(buf, len, "%llu.%02llux", |