Skip to contentSkip to conversation

dm-raid: avoid bitmap with raid4/5/6 journal device

PATCH New Heinz Mauelshagen 1 participant 1 message Oct 12, 2018 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm-raid: avoid bitmap with raid4/5/6 journal device

With raid4/5/6, journal device and write intent bitmap are mutually exclusive.

---
 drivers/md/dm-raid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-raid.c +1 -1
index c44925e4e481..e1dd1622a290 100644
@@ -2475,7 +2475,7 @@ static int super_validate(struct raid_set *rs, struct md_rdev *rdev)
 	}
 
 	/* Enable bitmap creation for RAID levels != 0 */
-	mddev->bitmap_info.offset = rt_is_raid0(rs->raid_type) ? 0 : to_sector(4096);
+	mddev->bitmap_info.offset = (rt_is_raid0(rs->raid_type) || rs->journal_dev.dev) ? 0 : to_sector(4096);
 	mddev->bitmap_info.default_offset = mddev->bitmap_info.offset;
 
 	if (!test_and_clear_bit(FirstUse, &rdev->flags)) {
Signature · 1 line
2.17.2