public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Naohiro Aota <naohiro.aota@wdc.com>
To: linux-btrfs@vger.kernel.org
Cc: dlemoal@kernel.org, axboe@kernel.dk, linux-block@vger.kernel.org,
	Naohiro Aota <naohiro.aota@wdc.com>
Subject: [PATCH 0/2] btrfs: zoned: skip reporting zone for new block group
Date: Wed, 12 Mar 2025 10:31:02 +0900	[thread overview]
Message-ID: <cover.1741596325.git.naohiro.aota@wdc.com> (raw)

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


             reply	other threads:[~2025-03-12  1:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12  1:31 Naohiro Aota [this message]
2025-03-12  1:31 ` [PATCH 1/2] block: introduce zone capacity helper Naohiro Aota
2025-03-12  1:39   ` Damien Le Moal
2025-03-12  2:07     ` Naohiro Aota
2025-03-12  5:27   ` Christoph Hellwig
2025-03-12  6:55     ` Damien Le Moal
2025-03-12  7:00       ` Christoph Hellwig
2025-03-12  7:11         ` Damien Le Moal
2025-03-12  1:31 ` [PATCH 2/2] btrfs: zoned: skip reporting zone for new block group Naohiro Aota
2025-03-12  1:42   ` Damien Le Moal
2025-03-13  2:24     ` Shinichiro Kawasaki

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=cover.1741596325.git.naohiro.aota@wdc.com \
    --to=naohiro.aota@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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