mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Move range_tree, btree, highbit64 to common code
Break out the range_tree, btree, and highbit64/lowbit64 code from kernel space into shared kernel and userspace code. This is needed for the updated `zpool status -vv` error byte range reporting that will be coming in a future commit. That commit needs the range_tree code in kernel and userspace. Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #18133
This commit is contained in:
+6
-3
@@ -191,9 +191,11 @@ void zfs_btree_fini(void);
|
||||
* size - the value of sizeof(struct my_type)
|
||||
* lsize - custom leaf size
|
||||
*/
|
||||
void zfs_btree_create(zfs_btree_t *, int (*) (const void *, const void *),
|
||||
void zfs_btree_create(zfs_btree_t *,
|
||||
int (*) (const void *, const void *),
|
||||
bt_find_in_buf_f, size_t);
|
||||
void zfs_btree_create_custom(zfs_btree_t *, int (*)(const void *, const void *),
|
||||
void zfs_btree_create_custom(zfs_btree_t *,
|
||||
int (*)(const void *, const void *),
|
||||
bt_find_in_buf_f, size_t, size_t);
|
||||
|
||||
/*
|
||||
@@ -213,7 +215,8 @@ void *zfs_btree_find(zfs_btree_t *, const void *, zfs_btree_index_t *);
|
||||
* node - the node to insert
|
||||
* where - position as returned from zfs_btree_find()
|
||||
*/
|
||||
void zfs_btree_add_idx(zfs_btree_t *, const void *, const zfs_btree_index_t *);
|
||||
void zfs_btree_add_idx(zfs_btree_t *, const void *,
|
||||
const zfs_btree_index_t *);
|
||||
|
||||
/*
|
||||
* Return the first or last valued node in the tree. Will return NULL if the
|
||||
|
||||
Reference in New Issue
Block a user