diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2016-08-03 17:47:04 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-08-03 12:36:54 -0400 |
commit | b2a4872a45280217149324e3bbef228cd5a0a270 (patch) | |
tree | 437d36f7b390c02d1af30d296c50374535ad85cf | |
parent | f15f64d65bc0a4cc0973b5a30854bb5091d34153 (diff) | |
download | linux-b2a4872a45280217149324e3bbef228cd5a0a270.tar.bz2 |
dm raid: constructor fails on non-zero incompat_features
When lvm2 userspace requests a RaidLV repair, it sets the rebuild
constructor flag on the new replacement DataLVs but does not clear the
respective MetaLVs. Hence the superblock that is loaded from such new
MetaLVs may have a non-zero incompat_features member and the constructor
will fail with false-positive on incompat_features.
Solve by initializing the incompat_features member properly.
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
-rw-r--r-- | drivers/md/dm-raid.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 5ef6b5af3fb4..7b403ab41bd3 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -1960,6 +1960,7 @@ static void super_sync(struct mddev *mddev, struct md_rdev *rdev) sb->data_offset = cpu_to_le64(rdev->data_offset); sb->new_data_offset = cpu_to_le64(rdev->new_data_offset); sb->sectors = cpu_to_le64(rdev->sectors); + sb->incompat_features = cpu_to_le32(0); /* Zero out the rest of the payload after the size of the superblock */ memset(sb + 1, 0, rdev->sb_size - sizeof(*sb)); |