aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2022-07-15 13:59:45 +0200
committerDavid Sterba <dsterba@suse.com>2022-07-15 19:15:19 +0200
commit088aea3b97e0ae5a2a86f5d142ad10fec8a1b80f (patch)
tree13e37c09db99b4675ae4fe676f470d562b5ebc6d /fs/btrfs/ctree.h
parentRevert "btrfs: turn name_cache radix tree into XArray in send_ctx" (diff)
downloadlinux-dev-088aea3b97e0ae5a2a86f5d142ad10fec8a1b80f.tar.xz
linux-dev-088aea3b97e0ae5a2a86f5d142ad10fec8a1b80f.zip
Revert "btrfs: turn delayed_nodes_tree into an XArray"
This reverts commit 253bf57555e451dec5a7f09dc95d380ce8b10e5b. Revert the xarray conversion, there's a problem with potential sleep-inside-spinlock [1] when calling xa_insert that triggers GFP_NOFS allocation. The radix tree used the preloading mechanism to avoid sleeping but this is not available in xarray. Conversion from spin lock to mutex is possible but at time of rc6 is riskier than a clean revert. [1] https://lore.kernel.org/linux-btrfs/cover.1657097693.git.fdmanana@suse.com/ Reported-by: Filipe Manana <fdmanana@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 a240e8b83709..9c21e214d29e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1222,10 +1222,10 @@ struct btrfs_root {
struct rb_root inode_tree;
/*
- * Xarray that keeps track of delayed nodes of every inode, protected
- * by inode_lock
+ * radix tree that keeps track of delayed nodes of every inode,
+ * protected by inode_lock
*/
- struct xarray delayed_nodes;
+ struct radix_tree_root delayed_nodes_tree;
/*
* right now this just gets used so that a root has its own devid
* for stat. It may be used for more later