diff options
author | delphij <delphij@FreeBSD.org> | 2014-08-10 05:58:41 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-08-10 05:58:41 +0000 |
commit | c14fd95fbce4723cad57b71f8e79384531937540 (patch) | |
tree | d685c6db2bb9a4d6c9e7e85215db5e682b38276d /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c | |
parent | 33ac232e589b350c7979e97a5f080b8939dcc19f (diff) | |
download | FreeBSD-src-c14fd95fbce4723cad57b71f8e79384531937540.zip FreeBSD-src-c14fd95fbce4723cad57b71f8e79384531937540.tar.gz |
MFC r269118: 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
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c index 15e123e..22175e0 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c @@ -81,6 +81,7 @@ range_tree_stat_incr(range_tree_t *rt, range_seg_t *rs) uint64_t size = rs->rs_end - rs->rs_start; int idx = highbit64(size) - 1; + ASSERT(size != 0); ASSERT3U(idx, <, sizeof (rt->rt_histogram) / sizeof (*rt->rt_histogram)); @@ -95,6 +96,7 @@ range_tree_stat_decr(range_tree_t *rt, range_seg_t *rs) uint64_t size = rs->rs_end - rs->rs_start; int idx = highbit64(size) - 1; + ASSERT(size != 0); ASSERT3U(idx, <, sizeof (rt->rt_histogram) / sizeof (*rt->rt_histogram)); |