public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] btrfs: zoned: skip reporting zone for new block group
@ 2025-03-18  0:59 Naohiro Aota
  2025-03-18  0:59 ` [PATCH v2 1/2] block: introduce zone capacity helper Naohiro Aota
  2025-03-18  0:59 ` [PATCH v2 2/2] btrfs: zoned: skip reporting zone for new block group Naohiro Aota
  0 siblings, 2 replies; 9+ messages in thread
From: Naohiro Aota @ 2025-03-18  0:59 UTC (permalink / raw)
  To: linux-btrfs; +Cc: dlemoal, axboe, linux-block, hch, Naohiro Aota

Newly created block group should reside on empty zones, whose write pointer
should always be 0. Also, we can load the zone capacity from the block
layer. So, we don't need to REPORT_ZONE to load the info.

The reporting zone on a new block group is not only unnecessary, but also
can cause a deadlock. When one process do a report zones and another
process freezes the block device, the report zones side cannot allocate
a tag because the freeze is already started. This can thus result in new
block group creation to hang forever, blocking the write path.

v1: https://patch.msgid.link/cover.1741596325.git.naohiro.aota@wdc.com

Naohiro Aota (2):
  block: introduce zone capacity helper
  btrfs: zoned: skip reporting zone for new block group

 fs/btrfs/zoned.c       | 18 ++++++++++--
 include/linux/blkdev.h | 67 ++++++++++++++++++++++++++++--------------
 2 files changed, 61 insertions(+), 24 deletions(-)

-- 
2.49.0


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

end of thread, other threads:[~2025-03-18  8:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18  0:59 [PATCH v2 0/2] btrfs: zoned: skip reporting zone for new block group Naohiro Aota
2025-03-18  0:59 ` [PATCH v2 1/2] block: introduce zone capacity helper Naohiro Aota
2025-03-18  5:14   ` Damien Le Moal
2025-03-18  5:54     ` Christoph Hellwig
2025-03-18  7:57       ` Damien Le Moal
2025-03-18  8:04         ` Christoph Hellwig
2025-03-18  7:27   ` Johannes Thumshirn
2025-03-18  0:59 ` [PATCH v2 2/2] btrfs: zoned: skip reporting zone for new block group Naohiro Aota
2025-03-18  7:25   ` Johannes Thumshirn

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