summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2022-07-15 13:59:31 +0200
committerDavid Sterba <dsterba@suse.com>2022-07-15 19:14:33 +0200
commit01cd390903e00c8f42ba0e84f25a70e3d613a15c (patch)
tree02a819b8fa313079209063a53e28156f9da52c30 /fs/btrfs/ctree.h
parentRevert "btrfs: turn fs_roots_radix in btrfs_fs_info into an XArray" (diff)
downloadlinux-01cd390903e00c8f42ba0e84f25a70e3d613a15c.tar.xz
linux-01cd390903e00c8f42ba0e84f25a70e3d613a15c.zip
Revert "btrfs: turn fs_info member buffer_radix into XArray"
This reverts commit 8ee922689d67b7cfa6acbe2aa1ee76ac72e6fc8a. 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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index e0d3cf2ec0dd..a240e8b83709 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -994,10 +994,10 @@ struct btrfs_fs_info {
struct btrfs_delayed_root *delayed_root;
- /* Extent buffer xarray */
+ /* Extent buffer radix tree */
spinlock_t buffer_lock;
/* Entries are eb->start / sectorsize */
- struct xarray extent_buffers;
+ struct radix_tree_root buffer_radix;
/* next backup root to be overwritten */
int backup_root_index;