Skip to contentSkip to conversation

btrfs: raid56: Fix stripes if vertical errors are found

PATCH In review Tanmay Bhushan 3 participants 3 messages Jan 15, 2023 – Jan 25, 2023 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: raid56: Fix stripes if vertical errors are found

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 a both stripes need to be fixed.

---
 fs/btrfs/raid56.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/raid56.c +1 -1
index 6a2cf754912d..f35898a78b16 100644
@@ -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;
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 5 lines · Tanmay Bhushan

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 a both stripes need to be fixed.

Oh, my bad, typical copy-and-paste error.

Should go in to the next rc.

Fixes 7a3150723061 ("btrfs: raid56: do data csum verification during RMW cycle")

Thanks,
Qu

Quoted 17 lines
---
  fs/btrfs/raid56.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/raid56.c +1 -1
index 6a2cf754912d..f35898a78b16 100644
@@ -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;