Skip to content

btrfs: follow regular writeback error handling by clearing block dirty and start/end writeback

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: clear block dirty if submit_one_sector() failedfs/btrfs/extent_io.c+17 -53 replies
2/2btrfs: clear block dirty if btrfs_writepage_cow_fixup() failedfs/btrfs/extent_io.c+5 -11 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchFilipe Manana
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs: follow regular writeback error handling by clearing block dirty and start/end writeback

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(-)
Signature · 1 line
2.50.1