mbox series

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

Message ID cover.1741596325.git.naohiro.aota@wdc.com (mailing list archive)
Headers show
Series btrfs: zoned: skip reporting zone for new block group | expand

Message

Naohiro Aota March 12, 2025, 1:31 a.m. UTC
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(-)