From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs: follow regular writeback error handling by clearing block dirty and start/end writeback
Date: Tue, 29 Jul 2025 19:01:44 +0930 [thread overview]
Message-ID: <cover.1753781242.git.wqu@suse.com> (raw)
Recently I'm working on various error handling fixes during
run_delalloc_range(), but sometimes I also hit generic/475 kernel
warnings where no failure from run_delalloc_range().
It turns out that extent_writepage_io() is not following the common
writeback error handling pattern, and leave failed blocks dirty.
This can lead to writeback of those failed blocks again, and the next
time we will hit various possible problems, but the most common one will
be the DEBUG_WARN() from btrfs_writepage_cow_fixup(), exactly the bug
I'm hunting.
So this series fixes the two error handling paths which still leaves the
blocks dirty (even intentionally, and of course that's caused by
myself), to clear the dirty flag and start/finish writeback for involved
block(s).
Qu Wenruo (2):
btrfs: clear block dirty if submit_one_sector() failed
btrfs: clear block dirty if btrfs_writepage_cow_fixup() failed
fs/btrfs/extent_io.c | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)
--
2.50.1
next reply other threads:[~2025-07-29 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 9:31 Qu Wenruo [this message]
2025-07-29 9:31 ` [PATCH 1/2] btrfs: clear block dirty if submit_one_sector() failed Qu Wenruo
2025-07-29 20:49 ` Leo Martins
2025-07-29 21:53 ` Qu Wenruo
2025-08-05 11:01 ` Filipe Manana
2025-07-29 9:31 ` [PATCH 2/2] btrfs: clear block dirty if btrfs_writepage_cow_fixup() failed Qu Wenruo
2025-08-05 11:11 ` Filipe Manana
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.1753781242.git.wqu@suse.com \
--to=wqu@suse.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.