From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
To: linux-btrfs@vger.kernel.org
Cc: Naohiro Aota <naohiro.aota@wdc.com>,
Damien Le Moal <dlemoal@kernel.org>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH 0/3] btrfs: zoned: fix hang with generic/551
Date: Mon, 2 Mar 2026 15:39:39 +0100 [thread overview]
Message-ID: <20260302143942.115619-1-johannes.thumshirn@wdc.com> (raw)
Running fstests generic/551 multiple times in a row reproduces a hang with
zoned btrfs.
This hang can be caused by long reclaim sweeps und system preassure and
then flushing the block-group reclaim work. Mitigate this issue in two
steps:
* First create a syncronously executable version of
btrfs_reclaim_bgs_work() in patch 2/3
* Change this synchronous version to accept a limit parameter, so we don't
run it off for too long and then call btrfs_reclaim_block_groups() with
a limit of 5 block-groups (this limit was arbitrarily chosen), this is
done in patch 3/3.
* Patch 1/3 is a small refactor of btrfs_reclaim_bgs_work() extracting the
reclaim of a single block-group into its own function, to make it a bit
more readable.
Johannes Thumshirn (3):
btrfs: move reclaiming of a single block group into its own function
btrfs: create btrfs_reclaim_block_groups()
btrfs: zoned: limit number of zones reclaimed in flush_space
fs/btrfs/block-group.c | 272 ++++++++++++++++++++++-------------------
fs/btrfs/block-group.h | 1 +
fs/btrfs/space-info.c | 3 +-
3 files changed, 148 insertions(+), 128 deletions(-)
--
2.53.0
next reply other threads:[~2026-03-02 14:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 14:39 Johannes Thumshirn [this message]
2026-03-02 14:39 ` [PATCH 1/3] btrfs: move reclaiming of a single block group into its own function Johannes Thumshirn
2026-03-03 7:34 ` Damien Le Moal
2026-03-02 14:39 ` [PATCH 2/3] btrfs: create btrfs_reclaim_block_groups() Johannes Thumshirn
2026-03-03 7:34 ` Damien Le Moal
2026-03-02 14:39 ` [PATCH 3/3] btrfs: zoned: limit number of zones reclaimed in flush_space Johannes Thumshirn
2026-03-03 7:41 ` Damien Le Moal
2026-03-03 9:07 ` Johannes Thumshirn
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=20260302143942.115619-1-johannes.thumshirn@wdc.com \
--to=johannes.thumshirn@wdc.com \
--cc=dlemoal@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
/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