All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: follow regular writeback error handling by clearing block dirty and start/end writeback
@ 2025-07-29  9:31 Qu Wenruo
  2025-07-29  9:31 ` [PATCH 1/2] btrfs: clear block dirty if submit_one_sector() failed Qu Wenruo
  2025-07-29  9:31 ` [PATCH 2/2] btrfs: clear block dirty if btrfs_writepage_cow_fixup() failed Qu Wenruo
  0 siblings, 2 replies; 7+ messages in thread
From: Qu Wenruo @ 2025-07-29  9:31 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-05 11:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-29  9:31 [PATCH 0/2] btrfs: follow regular writeback error handling by clearing block dirty and start/end writeback Qu Wenruo
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

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.