From: "Naohiro Aota" <Naohiro.Aota@wdc.com>
To: "Johannes Thumshirn" <johannes.thumshirn@wdc.com>,
<linux-btrfs@vger.kernel.org>
Cc: "Damien Le Moal" <dlemoal@kernel.org>,
"Naohiro Aota" <naohiro.aota@wdc.com>,
"Boris Burkov" <boris@bur.io>,
"Filipe Manana" <fdmanana@suse.com>,
"David Sterba" <dsterba@suse.com>,
"Josef Bacik" <josef@toxicpanda.com>
Subject: Re: [PATCH v8 01/27] btrfs: zoned: don't wait for a zone finish after a filesystem error
Date: Wed, 02 Dec 2026 10:50:27 +0900 [thread overview]
Message-ID: <DN9VBZOZQI0P.2Q5NFN468CKAJ@wdc.com> (raw)
In-Reply-To: <20261125102956.266389-2-johannes.thumshirn@wdc.com>
On Wed Nov 25, 2026 at 7:29 PM JST, Johannes Thumshirn wrote:
> When no zone can be activated, buffered writeback in cow_file_range() and
> direct IO in btrfs_new_extent_direct() wait uninterruptibly for
> BTRFS_FS_NEED_ZONE_FINISH to be cleared, which only happens once a zone
> is finished.
>
> After a transaction abort or an emergency shutdown no zone gets finished
> anymore, so the waiters sleep forever. With writeback holding locked
> folios, btrfs_cleanup_transaction() then blocks in
> invalidate_inode_pages2_range() as well. generic/388 hangs this way.
>
> Clear the bit and wake the waiters when the filesystem error is set,
> clear it again if it gets set after an error was recorded, and let the
> waiters bail out with the filesystem error.
>
> Fixes: 2ce543f47843 ("btrfs: zoned: wait until zone is finished when allocation didn't progress")
> Fixes: 776a838f1fa9 ("btrfs: zoned: wait for data BG to be finished on direct IO allocation")
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Looks good and necessary.
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
next prev parent reply other threads:[~2026-12-02 1:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 10:29 [PATCH v8 00/27] btrfs: zoned: metadata and GC updates Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 01/27] btrfs: zoned: don't wait for a zone finish after a filesystem error Johannes Thumshirn
2026-12-02 1:50 ` Naohiro Aota [this message]
2026-11-25 10:29 ` [PATCH v8 02/27] btrfs: zoned: reject dev-replace onto a target with different zone types Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 03/27] btrfs: zoned: fix possible race for reserved_active_zones Johannes Thumshirn
2026-11-26 10:08 ` Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 04/27] btrfs: zoned: don't use active zones for conventional stripes Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 05/27] btrfs: zoned: skip the append only metadata writeback path for conventional block groups Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 06/27] btrfs: zoned: never activate conventional metadata " Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 07/27] btrfs: zoned: use the regular allocator for " Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 08/27] btrfs: zoned: only take the metadata IO lock for append only " Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 09/27] btrfs: zoned: allow restricting the dev extent search to a zone type Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 10/27] btrfs: zoned: prefer conventional zones for metadata chunks Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 11/27] btrfs: zoned: use plain mutex lock in check_bg_is_active Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 12/27] btrfs: zoned: use plain mutex lock in btrfs_zoned_release_dirty_metadata Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 13/27] btrfs: zoned: remove btrfs_zoned_meta_io_(un)lock Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 14/27] btrfs: zoned: prefer sequential zones for data chunks Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 15/27] btrfs: zoned: wait for a running block group reclaim in RECLAIM_ZONES Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 16/27] btrfs: zoned: don't count in-flight data as available in statfs Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 17/27] btrfs: zoned: don't recheck the reclaim threshold of full zoned block-groups Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 18/27] btrfs: zoned: don't account superblock zones as available data space Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 19/27] btrfs: zoned: factor out resetting a block group in place Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 20/27] btrfs: zoned: prepare reserving the data relocation block group at runtime Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 21/27] btrfs: zoned: promote reset data block groups to the relocation target Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 22/27] btrfs: zoned: return finished relocation block groups to the data space_info Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 23/27] btrfs: zoned: reuse block groups emptied by reclaim as relocation target Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 24/27] btrfs: add btrfs_bg_type_to_num_stripes Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 25/27] btrfs: zoned: keep a zone free for relocation when allocating data chunks Johannes Thumshirn
2026-11-25 22:18 ` kernel test robot
2026-11-26 2:09 ` kernel test robot
2026-11-25 10:29 ` [PATCH v8 26/27] btrfs: zoned: don't count the relocation zone reserve as available in statfs Johannes Thumshirn
2026-11-25 10:29 ` [PATCH v8 27/27] btrfs: zoned: provide zoned specific reclaim sweep Johannes Thumshirn
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=DN9VBZOZQI0P.2Q5NFN468CKAJ@wdc.com \
--to=naohiro.aota@wdc.com \
--cc=boris@bur.io \
--cc=dlemoal@kernel.org \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.