linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock
@ 2022-07-06  9:09 fdmanana
  2022-07-06  9:09 ` [PATCH 1/3] btrfs: fix sleep while under a spinlock when allocating delayed inode fdmanana
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: fdmanana @ 2022-07-06  9:09 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

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(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-07-15 16:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06  9:09 [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock fdmanana
2022-07-06  9:09 ` [PATCH 1/3] btrfs: fix sleep while under a spinlock when allocating delayed inode fdmanana
2022-07-06  9:09 ` [PATCH 2/3] btrfs: fix sleep while under a spinlock when inserting a fs root fdmanana
2022-07-06  9:09 ` [PATCH 3/3] btrfs: free qgroup metadata without holding the fs roots lock fdmanana
2022-07-07 16:31 ` [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock David Sterba
2022-07-08  0:24   ` Matthew Wilcox
2022-07-12 11:45 ` Nikolay Borisov
2022-07-13 13:59 ` Filipe Manana
2022-07-15 12:01   ` David Sterba
2022-07-15 12:47     ` Nikolay Borisov
2022-07-15 16:52       ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).