Skip to contentSkip to conversation

Btrfs: fix check on same raid type flag twice

PATCH New [email protected] 1 participant 1 message Apr 29, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: fix check on same raid type flag twice

From: Henrik Nordvik <[email protected]>

Code checked for raid 5 flag in two else-if branches, so code would never be reached. Probably a copy-paste bug.

---
 fs/btrfs/disk-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/disk-io.c +1 -1
index 6d19a0a..19a327d 100644
@@ -3141,7 +3141,7 @@ int btrfs_calc_num_tolerated_disk_barrier_failures(
 					    BTRFS_BLOCK_GROUP_RAID10)) {
 						num_tolerated_disk_barrier_failures = 1;
 					} else if (flags &
-						   BTRFS_BLOCK_GROUP_RAID5) {
+						   BTRFS_BLOCK_GROUP_RAID6) {
 						num_tolerated_disk_barrier_failures = 2;
 					}
 				}
Signature · 1 line
1.8.1.2