aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-04-18 21:15:12 +0000
committerXin LI <delphij@FreeBSD.org>2014-04-18 21:15:12 +0000
commit613074ec080d9eff833bc3670c003e16decdea0f (patch)
treef9b95868ce5b65d893f646a7e4cc05e9a66369cc /cddl/contrib/opensolaris
parent2bb082980b7571d27d900760edf77ce395600829 (diff)
parent745fef148911aa617e5c739cfc7b0685a105a052 (diff)
downloadsrc-613074ec080d9eff833bc3670c003e16decdea0f.tar.gz
src-613074ec080d9eff833bc3670c003e16decdea0f.zip
MFV r264666:
4374 dn_free_ranges should use range_tree_t illumos/illumos-gate@bf16b11e8deb633dd6c4296d46e92399d1582df4 MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=264669
Diffstat (limited to 'cddl/contrib/opensolaris')
-rw-r--r--cddl/contrib/opensolaris/cmd/zdb/zdb.c5
-rw-r--r--cddl/contrib/opensolaris/lib/libzpool/common/kernel.c11
-rw-r--r--cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h4
3 files changed, 10 insertions, 10 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
index b9dc923643f2..61e80714ac21 100644
--- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c
+++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/
#include <stdio.h>
@@ -2741,7 +2741,8 @@ dump_simulated_ddt(spa_t *spa)
dds.dds_ref_psize = zdde->zdde_ref_psize;
dds.dds_ref_dsize = zdde->zdde_ref_dsize;
- ddt_stat_add(&ddh_total.ddh_stat[highbit(refcnt) - 1], &dds, 0);
+ ddt_stat_add(&ddh_total.ddh_stat[highbit64(refcnt) - 1],
+ &dds, 0);
umem_free(zdde, sizeof (*zdde));
}
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
index 19fbf4fb0d67..2b174f9bed5d 100644
--- a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
+++ b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
@@ -20,6 +20,8 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/
#include <assert.h>
@@ -800,20 +802,17 @@ delay(clock_t ticks)
/*
* Find highest one bit set.
* Returns bit number + 1 of highest bit that is set, otherwise returns 0.
- * High order bit is 31 (or 63 in _LP64 kernel).
*/
int
-highbit(ulong_t i)
+highbit64(uint64_t i)
{
- register int h = 1;
+ int h = 1;
if (i == 0)
return (0);
-#ifdef _LP64
- if (i & 0xffffffff00000000ul) {
+ if (i & 0xffffffff00000000ULL) {
h += 32; i >>= 32;
}
-#endif
if (i & 0xffff0000) {
h += 16; i >>= 16;
}
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
index b5562c763d52..cc8285d2ea96 100644
--- a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
+++ b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
@@ -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) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
/*
@@ -558,7 +558,7 @@ extern void delay(clock_t ticks);
extern uint64_t physmem;
-extern int highbit(ulong_t i);
+extern int highbit64(uint64_t i);
extern int random_get_bytes(uint8_t *ptr, size_t len);
extern int random_get_pseudo_bytes(uint8_t *ptr, size_t len);