Skip to contentSkip to conversation

dm-raid-cleanup-parameter-handling-2.patch

PATCH New Jonathan Brassow 1 participant 1 message Jul 14, 2011 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm-raid-cleanup-parameter-handling-2.patch

Correct parameter count for RAID status table.

The parameters for rebuilds are already counted by the preceding 'for' loop. Do not count them again.

drivers/md/dm-raid.c +1 -1
Index: linux-2.6/drivers/md/dm-raid.c
===================================================================
@@ -554,7 +554,7 @@ static int raid_status(struct dm_target 
 			    !test_bit(In_sync, &rs->dev[i].rdev.flags))
 				raid_param_cnt += 2; /* for rebuilds */
 
-		raid_param_cnt += (hweight64(rs->print_flags) * 2);
+		raid_param_cnt += (hweight64(rs->print_flags & ~DMPF_REBUILD) * 2);
 		if (rs->print_flags & (DMPF_SYNC | DMPF_NOSYNC))
 			raid_param_cnt--;