diff options
author | Matthew Ahrens <[email protected]> | 2014-04-15 19:40:22 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-07-30 09:20:35 -0700 |
commit | 9bd274ddd846cd4024ebe3253c7b2d4f3b6f9dc0 (patch) | |
tree | 81da771b7588f8585fca225f38a32f605a3486a1 /module/zfs/metaslab.c | |
parent | da536844d55b2f3aaefdaebd36fb97bb867494aa (diff) |
Illumos #4374
4374 dn_free_ranges should use range_tree_t
Reviewed by: George Wilson <[email protected]>
Reviewed by: Max Grossman <[email protected]>
Reviewed by: Christopher Siden <[email protected]
Reviewed by: Garrett D'Amore <[email protected]>
Reviewed by: Dan McDonald <[email protected]>
Approved by: Dan McDonald <[email protected]>
References:
https://www.illumos.org/issues/4374
https://github.com/illumos/illumos-gate/commit/bf16b11
Ported by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2531
Diffstat (limited to 'module/zfs/metaslab.c')
-rw-r--r-- | module/zfs/metaslab.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c index 6d6ff0914..06d7f7cd2 100644 --- a/module/zfs/metaslab.c +++ b/module/zfs/metaslab.c @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ @@ -703,7 +703,7 @@ metaslab_ff_alloc(metaslab_t *msp, uint64_t size) * may exist in the same region. */ uint64_t align = size & -size; - uint64_t *cursor = &msp->ms_lbas[highbit(align) - 1]; + uint64_t *cursor = &msp->ms_lbas[highbit64(align) - 1]; avl_tree_t *t = &msp->ms_tree->rt_root; return (metaslab_block_picker(t, cursor, size, align)); @@ -744,7 +744,7 @@ metaslab_df_alloc(metaslab_t *msp, uint64_t size) * may exist in the same region. */ uint64_t align = size & -size; - uint64_t *cursor = &msp->ms_lbas[highbit(align) - 1]; + uint64_t *cursor = &msp->ms_lbas[highbit64(align) - 1]; range_tree_t *rt = msp->ms_tree; avl_tree_t *t = &rt->rt_root; uint64_t max_size = metaslab_block_maxsize(msp); @@ -869,7 +869,7 @@ metaslab_ndf_alloc(metaslab_t *msp, uint64_t size) avl_tree_t *t = &msp->ms_tree->rt_root; avl_index_t where; range_seg_t *rs, rsearch; - uint64_t hbit = highbit(size); + uint64_t hbit = highbit64(size); uint64_t *cursor = &msp->ms_lbas[hbit - 1]; uint64_t max_size = metaslab_block_maxsize(msp); @@ -1117,7 +1117,7 @@ metaslab_weight_factor(metaslab_t *msp) if (msp->ms_sm == NULL) { vdev_t *vd = msp->ms_group->mg_vd; - i = highbit(msp->ms_size) - 1; + i = highbit64(msp->ms_size) - 1; sectors = msp->ms_size >> vd->vdev_ashift; return (sectors * i * vd->vdev_ashift); } |