linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: torvalds@linux-foundation.org
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	willy@infradead.org
Subject: [GIT PULL] Btrfs fixes for 5.19-rc7
Date: Sat, 16 Jul 2022 16:06:20 +0200	[thread overview]
Message-ID: <cover.1657976305.git.dsterba@suse.com> (raw)

Hi,

due to a recent report [1] we need to revert the radix tree to xarray
conversion patches. There's a problem with sleeping under spinlock, when
xa_insert could allocate memory under pressure. We use GFP_NOFS so this
is a real problem that we unfortunately did not discover during review.

I'm sorry to do such change at rc6 time but the revert is IMO the safer
option, there are patches to use mutex instead of the spin locks but
that would need more testing.  The revert branch has been tested on a
few setups, all seem ok.  The conversion to xarray will be revisited in
the future.

[1] https://lore.kernel.org/linux-btrfs/cover.1657097693.git.fdmanana@suse.com/

Note about the xarray API:

The possible sleeping is documented next to xa_insert, however there's
no runtime check for that, like is eg. in radix_tree_preload.  The
context does not need to be atomic so it's not as simple as

  might_sleep_if(gfpflags_allow_blocking(gfp));

or

  WARN_ON_ONCE(gfpflags_allow_blocking(gfp));

Some kind of development time debugging/assertion aid would be nice.

----------------------------------------------------------------
The following changes since commit b3a3b0255797e1d395253366ba24a4cc6c8bdf9c:

  btrfs: zoned: drop optimization of zone finish (2022-07-08 19:18:00 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.19-rc7-tag

for you to fetch changes up to 088aea3b97e0ae5a2a86f5d142ad10fec8a1b80f:

  Revert "btrfs: turn delayed_nodes_tree into an XArray" (2022-07-15 19:15:19 +0200)

----------------------------------------------------------------
David Sterba (4):
      Revert "btrfs: turn fs_roots_radix in btrfs_fs_info into an XArray"
      Revert "btrfs: turn fs_info member buffer_radix into XArray"
      Revert "btrfs: turn name_cache radix tree into XArray in send_ctx"
      Revert "btrfs: turn delayed_nodes_tree into an XArray"

 fs/btrfs/ctree.h             |  18 ++---
 fs/btrfs/delayed-inode.c     |  84 ++++++++++----------
 fs/btrfs/disk-io.c           | 179 ++++++++++++++++++++++++-------------------
 fs/btrfs/extent-tree.c       |   2 +-
 fs/btrfs/extent_io.c         | 122 +++++++++++++++++------------
 fs/btrfs/inode.c             |  15 ++--
 fs/btrfs/send.c              |  40 +++++-----
 fs/btrfs/tests/btrfs-tests.c |  24 +++++-
 fs/btrfs/transaction.c       | 112 +++++++++++++++------------
 9 files changed, 340 insertions(+), 256 deletions(-)

             reply	other threads:[~2022-07-16 14:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-16 14:06 David Sterba [this message]
2022-07-16 15:34 ` [GIT PULL] Btrfs fixes for 5.19-rc7 Matthew Wilcox
2022-07-21 14:45   ` David Sterba
2022-07-21 15:43     ` David Sterba
2022-07-16 22:10 ` pr-tracker-bot
  -- strict thread matches above, loose matches on Subject: below --
2022-07-11 21:16 David Sterba
2022-07-11 21:44 ` pr-tracker-bot

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.1657976305.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.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 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).