mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
Revert "btrfs: turn fs_info member buffer_radix into XArray"
This reverts commit 8ee922689d
.
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>
This commit is contained in:
parent
fc7cbcd489
commit
01cd390903
4 changed files with 96 additions and 54 deletions
|
@ -486,7 +486,7 @@ static int csum_dirty_subpage_buffers(struct btrfs_fs_info *fs_info,
|
|||
uptodate = btrfs_subpage_test_uptodate(fs_info, page, cur,
|
||||
fs_info->nodesize);
|
||||
|
||||
/* A dirty eb shouldn't disappear from extent_buffers */
|
||||
/* A dirty eb shouldn't disappear from buffer_radix */
|
||||
if (WARN_ON(!eb))
|
||||
return -EUCLEAN;
|
||||
|
||||
|
@ -3150,7 +3150,7 @@ static int __cold init_tree_roots(struct btrfs_fs_info *fs_info)
|
|||
void btrfs_init_fs_info(struct btrfs_fs_info *fs_info)
|
||||
{
|
||||
INIT_RADIX_TREE(&fs_info->fs_roots_radix, GFP_ATOMIC);
|
||||
xa_init_flags(&fs_info->extent_buffers, GFP_ATOMIC);
|
||||
INIT_RADIX_TREE(&fs_info->buffer_radix, GFP_ATOMIC);
|
||||
INIT_LIST_HEAD(&fs_info->trans_list);
|
||||
INIT_LIST_HEAD(&fs_info->dead_roots);
|
||||
INIT_LIST_HEAD(&fs_info->delayed_iputs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue