Skip to content

btrfs: fix the generic/475 crash for subpage case

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: don't try to flush data write bio if we hit error preparing itfs/btrfs/extent_io.c+12 -50 replies
2/2btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error handlingfs/btrfs/file-item.c+13 -15 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs: fix the generic/475 crash for subpage case

Test case generic/475 expose random crash (1/20~1/5) trigged by the BUG_ON() inside btrfs_csum_one_bio().

The direct cause is we're trying to submit a write bio, even after we hit some error and already have ordered extent cleaned up.

The first patch will try to fix all those call sites, then the 2nd patch will add an extra safe net to prevent such case to be escalated into a crash.

Qu Wenruo (2):
btrfs: don't try to flush data write bio if we hit error preparing it
btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error
handling

 fs/btrfs/extent_io.c | 17 ++++++++++++-----
 fs/btrfs/file-item.c | 14 +++++++++++++-
 2 files changed, 25 insertions(+), 6 deletions(-)
Signature · 1 line
2.32.0