All of lore.kernel.org
 help / color / mirror / Atom feed
From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock
Date: Wed,  6 Jul 2022 10:09:44 +0100	[thread overview]
Message-ID: <cover.1657097693.git.fdmanana@suse.com> (raw)

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


             reply	other threads:[~2022-07-06  9:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  9:09 fdmanana [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1657097693.git.fdmanana@suse.com \
    --to=fdmanana@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.