linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH STABLE 5.18 0/2] btrfs: raid56 backports to reduce destructive RMW
@ 2022-08-04  8:10 Qu Wenruo
  2022-08-04  8:10 ` [PATCH STABLE 5.18 1/2] btrfs: only write the sectors in the vertical stripe which has data stripes Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Qu Wenruo @ 2022-08-04  8:10 UTC (permalink / raw)
  To: linux-btrfs, stable

Hi Greg and Sasha,

This two patches are backports for v5.18 branch.

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.
(The v5.18 backport is more like the v5.15 backport, with small tweaks
due to member naming change).

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(-)

-- 
2.37.0


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH STABLE 5.18 0/2] btrfs: raid56: backports to reduce corruption
@ 2022-08-19  7:40 Qu Wenruo
  2022-08-19  7:40 ` [PATCH STABLE 5.18 2/2] btrfs: raid56: don't trust any cached sector in __raid56_parity_recover() Qu Wenruo
  0 siblings, 1 reply; 9+ messages in thread
From: Qu Wenruo @ 2022-08-19  7:40 UTC (permalink / raw)
  To: linux-btrfs, stable

This is the backport for v5.18.x stable branch.

The full explananation can be found here:
https://lore.kernel.org/linux-btrfs/Yv85PTBsDhrQITZp@kroah.com/T/#t

Difference between v5.18.x and v5.19.x backports:

- Subpage sector::uptodate related changes
  Since v5.18 and older branches doesn't support subpage RAID56, these
  uptodate checks are now in their older PageUptodate form.

- Various member naming changes
  Like btrfs_raid_bio::stripe_npages -> stripe_nsector.

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(-)

-- 
2.37.1


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

end of thread, other threads:[~2022-08-19  7:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04  8:10 [PATCH STABLE 5.18 0/2] btrfs: raid56 backports to reduce destructive RMW Qu Wenruo
2022-08-04  8:10 ` [PATCH STABLE 5.18 1/2] btrfs: only write the sectors in the vertical stripe which has data stripes Qu Wenruo
2022-08-04  8:10 ` [PATCH STABLE 5.18 2/2] btrfs: raid56: don't trust any cached sector in __raid56_parity_recover() Qu Wenruo
2022-08-04 23:28 ` [PATCH STABLE 5.18 0/2] btrfs: raid56 backports to reduce destructive RMW Qu Wenruo
2022-08-08 13:39 ` Greg KH
2022-08-13 13:13   ` Greg KH
2022-08-13 22:17     ` Qu Wenruo
2022-08-17 16:23       ` David Sterba
  -- strict thread matches above, loose matches on Subject: below --
2022-08-19  7:40 [PATCH STABLE 5.18 0/2] btrfs: raid56: backports to reduce corruption Qu Wenruo
2022-08-19  7:40 ` [PATCH STABLE 5.18 2/2] btrfs: raid56: don't trust any cached sector in __raid56_parity_recover() Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).