aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zap_leaf.c
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2014-04-15 19:40:22 -0800
committerBrian Behlendorf <[email protected]>2014-07-30 09:20:35 -0700
commit9bd274ddd846cd4024ebe3253c7b2d4f3b6f9dc0 (patch)
tree81da771b7588f8585fca225f38a32f605a3486a1 /module/zfs/zap_leaf.c
parentda536844d55b2f3aaefdaebd36fb97bb867494aa (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/zap_leaf.c')
-rw-r--r--module/zfs/zap_leaf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/module/zfs/zap_leaf.c b/module/zfs/zap_leaf.c
index 13bc879d7..0e30ef319 100644
--- a/module/zfs/zap_leaf.c
+++ b/module/zfs/zap_leaf.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) 2013, 2014 by Delphix. All rights reserved.
*/
/*
@@ -105,16 +105,16 @@ zap_leaf_byteswap(zap_leaf_phys_t *buf, int size)
{
int i;
zap_leaf_t l;
- l.l_bs = highbit(size)-1;
+ l.l_bs = highbit64(size) - 1;
l.l_phys = buf;
- buf->l_hdr.lh_block_type = BSWAP_64(buf->l_hdr.lh_block_type);
- buf->l_hdr.lh_prefix = BSWAP_64(buf->l_hdr.lh_prefix);
- buf->l_hdr.lh_magic = BSWAP_32(buf->l_hdr.lh_magic);
- buf->l_hdr.lh_nfree = BSWAP_16(buf->l_hdr.lh_nfree);
- buf->l_hdr.lh_nentries = BSWAP_16(buf->l_hdr.lh_nentries);
- buf->l_hdr.lh_prefix_len = BSWAP_16(buf->l_hdr.lh_prefix_len);
- buf->l_hdr.lh_freelist = BSWAP_16(buf->l_hdr.lh_freelist);
+ buf->l_hdr.lh_block_type = BSWAP_64(buf->l_hdr.lh_block_type);
+ buf->l_hdr.lh_prefix = BSWAP_64(buf->l_hdr.lh_prefix);
+ buf->l_hdr.lh_magic = BSWAP_32(buf->l_hdr.lh_magic);
+ buf->l_hdr.lh_nfree = BSWAP_16(buf->l_hdr.lh_nfree);
+ buf->l_hdr.lh_nentries = BSWAP_16(buf->l_hdr.lh_nentries);
+ buf->l_hdr.lh_prefix_len = BSWAP_16(buf->l_hdr.lh_prefix_len);
+ buf->l_hdr.lh_freelist = BSWAP_16(buf->l_hdr.lh_freelist);
for (i = 0; i < ZAP_LEAF_HASH_NUMENTRIES(&l); i++)
buf->l_hash[i] = BSWAP_16(buf->l_hash[i]);
@@ -157,7 +157,7 @@ zap_leaf_init(zap_leaf_t *l, boolean_t sort)
{
int i;
- l->l_bs = highbit(l->l_dbuf->db_size)-1;
+ l->l_bs = highbit64(l->l_dbuf->db_size) - 1;
zap_memset(&l->l_phys->l_hdr, 0, sizeof (struct zap_leaf_header));
zap_memset(l->l_phys->l_hash, CHAIN_END, 2*ZAP_LEAF_HASH_NUMENTRIES(l));
for (i = 0; i < ZAP_LEAF_NUMCHUNKS(l); i++) {