diff options
author | Alex Reece <[email protected]> | 2015-04-03 14:14:28 +1100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-04-28 16:24:03 -0700 |
commit | 8951cb8dfb8dcf410a237656c1f9c9767e4a9e6c (patch) | |
tree | e057d73086a975a0e22eae721ddb332ec5c81e6b /include/sys/avl.h | |
parent | 58c4aa00c65e09f254de0b939b2c1aa720c204a1 (diff) |
Illumos 4873 - zvol unmap calls can take a very long time for larger datasets
4873 zvol unmap calls can take a very long time for larger datasets
Author: Alex Reece <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Paul Dagnelie <[email protected]>
Reviewed by: Basil Crow <[email protected]>
Reviewed by: Dan McDonald <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
References:
https://www.illumos.org/issues/4873
https://github.com/illumos/illumos-gate/commit/0f6d88a
Porting Notes:
dbuf_free_range():
- reduce stack usage using kmem_alloc()
- the sorted AVL tree will handle the spill block case correctly
without all the special handling in the for() loop
Ported-by: Chris Dunlop <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'include/sys/avl.h')
-rw-r--r-- | include/sys/avl.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sys/avl.h b/include/sys/avl.h index ba305c908..9bc2b4a32 100644 --- a/include/sys/avl.h +++ b/include/sys/avl.h @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2014 by Delphix. All rights reserved. + */ + #ifndef _AVL_H #define _AVL_H @@ -260,6 +264,11 @@ extern boolean_t avl_update_lt(avl_tree_t *, void *); extern boolean_t avl_update_gt(avl_tree_t *, void *); /* + * Swaps the contents of the two trees. + */ +extern void avl_swap(avl_tree_t *tree1, avl_tree_t *tree2); + +/* * Return the number of nodes in the tree */ extern ulong_t avl_numnodes(avl_tree_t *tree); |