[PATCH 0/2] btrfs: zoned: skip reporting zone for new block group

Naohiro Aota
2025-03-12T01:32:20Z

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.

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 | 21 +++++++++++++++++++++
2 files changed, 37 insertions(+), 2 deletions(-)

--
2.48.1