summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorGabriel Niebler <gniebler@suse.com>2022-04-26 11:43:04 +0200
committerDavid Sterba <dsterba@suse.com>2022-05-16 17:03:16 +0200
commit253bf57555e451dec5a7f09dc95d380ce8b10e5b (patch)
tree10deeea6290ca98bd6b4f9dcc2f4952675da7ada /fs/btrfs/ctree.h
parentbtrfs: use ilog2() to replace if () branches for btrfs_bg_flags_to_raid_index() (diff)
downloadlinux-253bf57555e451dec5a7f09dc95d380ce8b10e5b.tar.xz
linux-253bf57555e451dec5a7f09dc95d380ce8b10e5b.zip
btrfs: turn delayed_nodes_tree into an XArray
… in the btrfs_root struct and adjust all usages of this object to use the XArray API, because it is notionally easier to use and understand, as it provides array semantics, and also takes care of locking for us, further simplifying the code. Also use the opportunity to do some light refactoring. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Gabriel Niebler <gniebler@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index f55b15437602..9eebd96c6639 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1222,10 +1222,10 @@ struct btrfs_root {
struct rb_root inode_tree;
/*
- * radix tree that keeps track of delayed nodes of every inode,
- * protected by inode_lock
+ * Xarray that keeps track of delayed nodes of every inode, protected
+ * by inode_lock
*/
- struct radix_tree_root delayed_nodes_tree;
+ struct xarray delayed_nodes;
/*
* right now this just gets used so that a root has its own devid
* for stat. It may be used for more later