Skip to content

btrfs: raid56 backports to reduce destructive RMW

Qu Wenruo linux-btrfs stable 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Fix a crash in btrfs/158 caused by uninitialized btrfs_raid_bio::fs_info
This is another change in the code base which needs manual handling.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: only write the sectors in the vertical stripe which has data stripesfs/btrfs/raid56.c+51 -40 replies
2/2btrfs: raid56: don't trust any cached sector in __raid56_parity_recover()fs/btrfs/raid56.c+6 -130 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 STABLE 5.10 5.15 0/2] btrfs: raid56 backports to reduce destructive RMW

[CHANGELOG]
v2:
- Fix a crash in btrfs/158 caused by uninitialized btrfs_raid_bio::fs_info
This is another change in the code base which needs manual handling.

Hi Greg and Sasha,

This two patches are backports for v5.15 and v5.10 (for v5.10 conflicts can be auto resolved) stable branches.

(For older branches from v4.9 to v5.4, due to some naming change, although the patches can be applied with auto-resolve, they won't compile).

These two patches are reducing the chance of destructive RMW cycle, where btrfs can use corrupted data to generate new P/Q, thus making some repairable data unrepairable.

Those patches are more important than what I initially thought, thus unfortunately they are not CCed to stable by themselves.

Furthermore due to recent refactors/renames, there are quite some member change related to those patches, thus have to be manually backported.

One of the fastest way to verify the behavior is the existing btrfs/125 test case from fstests. (not in auto group AFAIK).

Qu Wenruo (2):
btrfs: only write the sectors in the vertical stripe which has data
stripes
btrfs: raid56: don't trust any cached sector in

    __raid56_parity_recover()
 fs/btrfs/raid56.c | 74 ++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 57 insertions(+), 17 deletions(-)
Signature · 1 line
2.37.0