Skip to content

Commit

Permalink
btrfs: raid56: fix stripes if vertical errors are found
Browse files Browse the repository at this point in the history
We take two stripe numbers if vertical errors are found.  In case it is
just a pstripe it does not matter but in case of raid 6 it matters as
both stripes need to be fixed.

Fixes: 7a31507 ("btrfs: raid56: do data csum verification during RMW cycle")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Tanmay Bhushan <007047221b@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Tanmay Bhushan authored and David Sterba committed Jan 25, 2023
1 parent b7adbf9 commit f7c11af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/raid56.c
Original file line number Diff line number Diff line change
Expand Up @@ -1886,7 +1886,7 @@ static int recover_vertical(struct btrfs_raid_bio *rbio, int sector_nr,
sector->uptodate = 1;
}
if (failb >= 0) {
ret = verify_one_sector(rbio, faila, sector_nr);
ret = verify_one_sector(rbio, failb, sector_nr);
if (ret < 0)
goto cleanup;

Expand Down

0 comments on commit f7c11af

Please sign in to comment.