summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2018-10-12 20:24:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-01 09:16:39 +0100
commit56b8b18321223aa3574856f17457539e8c117726 (patch)
treecadbf47923d7d108cdc2cf28abfa8699deef3d1b /drivers/md
parent4de506d51177d8ad2a48a212408c494c67efbd15 (diff)
downloadlinux-stable-56b8b18321223aa3574856f17457539e8c117726.tar.gz
linux-stable-56b8b18321223aa3574856f17457539e8c117726.tar.bz2
linux-stable-56b8b18321223aa3574856f17457539e8c117726.zip
dm raid: avoid bitmap with raid4/5/6 journal device
[ Upstream commit d857ad75edf3c0066fcd920746f9dc75382b3324 ] With raid4/5/6, journal device and write intent bitmap are mutually exclusive. Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-raid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index b78a8a4d061c..6c9b54288261 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -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)) {