summaryrefslogtreecommitdiffstats
path: root/include/sys
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 /include/sys
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 'include/sys')
-rw-r--r--include/sys/dnode.h6
-rw-r--r--include/sys/range_tree.h3
-rw-r--r--include/sys/zfs_context.h4
3 files changed, 6 insertions, 7 deletions
diff --git a/include/sys/dnode.h b/include/sys/dnode.h
index 4ca2a8a13..64bf000b6 100644
--- a/include/sys/dnode.h
+++ b/include/sys/dnode.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.
*/
#ifndef _SYS_DNODE_H
@@ -220,7 +220,7 @@ typedef struct dnode {
/* protected by dn_mtx: */
kmutex_t dn_mtx;
list_t dn_dirty_records[TXG_SIZE];
- avl_tree_t dn_ranges[TXG_SIZE];
+ struct range_tree *dn_free_ranges[TXG_SIZE];
uint64_t dn_allocated_txg;
uint64_t dn_free_txg;
uint64_t dn_assigned_txg;
@@ -302,8 +302,6 @@ void dnode_buf_byteswap(void *buf, size_t size);
void dnode_verify(dnode_t *dn);
int dnode_set_blksz(dnode_t *dn, uint64_t size, int ibs, dmu_tx_t *tx);
void dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx);
-void dnode_clear_range(dnode_t *dn, uint64_t blkid,
- uint64_t nblks, dmu_tx_t *tx);
void dnode_diduse_space(dnode_t *dn, int64_t space);
void dnode_willuse_space(dnode_t *dn, int64_t space, dmu_tx_t *tx);
void dnode_new_blkid(dnode_t *dn, uint64_t blkid, dmu_tx_t *tx, boolean_t);
diff --git a/include/sys/range_tree.h b/include/sys/range_tree.h
index a41effe4e..9f3ead537 100644
--- a/include/sys/range_tree.h
+++ b/include/sys/range_tree.h
@@ -24,7 +24,7 @@
*/
/*
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
*/
#ifndef _SYS_RANGE_TREE_H
@@ -85,6 +85,7 @@ void range_tree_stat_verify(range_tree_t *rt);
void range_tree_add(void *arg, uint64_t start, uint64_t size);
void range_tree_remove(void *arg, uint64_t start, uint64_t size);
+void range_tree_clear(range_tree_t *rt, uint64_t start, uint64_t size);
void range_tree_vacate(range_tree_t *rt, range_tree_func_t *func, void *arg);
void range_tree_walk(range_tree_t *rt, range_tree_func_t *func, void *arg);
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index ec2a7dea0..fd3e0b0d4 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -25,7 +25,7 @@
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/
#ifndef _SYS_ZFS_CONTEXT_H
@@ -623,7 +623,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);