Skip to content

Commit b2a4872

Browse files
mauelshasnitm
authored andcommitted
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>
1 parent f15f64d commit b2a4872

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/dm-raid.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,6 +1960,7 @@ static void super_sync(struct mddev *mddev, struct md_rdev *rdev)
19601960
sb->data_offset = cpu_to_le64(rdev->data_offset);
19611961
sb->new_data_offset = cpu_to_le64(rdev->new_data_offset);
19621962
sb->sectors = cpu_to_le64(rdev->sectors);
1963+
sb->incompat_features = cpu_to_le32(0);
19631964

19641965
/* Zero out the rest of the payload after the size of the superblock */
19651966
memset(sb + 1, 0, rdev->sb_size - sizeof(*sb));

0 commit comments

Comments
 (0)