public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: zoned: fix hang with generic/551
@ 2026-03-02 14:39 Johannes Thumshirn
  2026-03-02 14:39 ` [PATCH 1/3] btrfs: move reclaiming of a single block group into its own function Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Johannes Thumshirn @ 2026-03-02 14:39 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Naohiro Aota, Damien Le Moal, Johannes Thumshirn

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


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

end of thread, other threads:[~2026-03-03  9:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 14:39 [PATCH 0/3] btrfs: zoned: fix hang with generic/551 Johannes Thumshirn
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox