Skip to content

btrfs: fix a couple sleeps while holding a spinlock

[email protected] linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: fix sleep while under a spinlock when allocating delayed inodefs/btrfs/ctree.h fs/btrfs/delayed-inode.c fs/btrfs/disk-io.c +2 more+36 -310 replies
2/3btrfs: fix sleep while under a spinlock when inserting a fs rootfs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/inode.c +1 more+28 -280 replies
3/3btrfs: free qgroup metadata without holding the fs roots lockfs/btrfs/transaction.c+1 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNikolay Borisov
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock

From: Filipe Manana <[email protected]>

After the recent conversions of a couple radix trees to XArrays, we now can end up attempting to sleep while holding a spinlock. This happens because if xa_insert() allocates memory (using GFP_NOFS) it may need to sleep (more likely to happen when under memory pressure). In the old code this did not happen because we had radix_tree_preload() called before taking the spinlocks.

Filipe Manana (3):
btrfs: fix sleep while under a spinlock when allocating delayed inode
btrfs: fix sleep while under a spinlock when inserting a fs root
btrfs: free qgroup metadata without holding the fs roots lock

 fs/btrfs/ctree.h         |  6 +++---
 fs/btrfs/delayed-inode.c | 24 ++++++++++++------------
 fs/btrfs/disk-io.c       | 38 +++++++++++++++++++-------------------
 fs/btrfs/inode.c         | 30 ++++++++++++++++--------------
 fs/btrfs/relocation.c    | 11 +++++++----
 fs/btrfs/transaction.c   | 14 +++++++-------
 6 files changed, 64 insertions(+), 59 deletions(-)
Signature · 1 line
2.35.1