diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 866c704e008a..1be3f2de396b 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -875,7 +875,7 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version) | |||
875 | sb->major_version != cpu_to_le32(1) || | 875 | sb->major_version != cpu_to_le32(1) || |
876 | le32_to_cpu(sb->max_dev) > (4096-256)/2 || | 876 | le32_to_cpu(sb->max_dev) > (4096-256)/2 || |
877 | le64_to_cpu(sb->super_offset) != (rdev->sb_offset<<1) || | 877 | le64_to_cpu(sb->super_offset) != (rdev->sb_offset<<1) || |
878 | sb->feature_map != 0) | 878 | (le32_to_cpu(sb->feature_map) & ~MD_FEATURE_ALL) != 0) |
879 | return -EINVAL; | 879 | return -EINVAL; |
880 | 880 | ||
881 | if (calc_sb_1_csum(sb) != sb->sb_csum) { | 881 | if (calc_sb_1_csum(sb) != sb->sb_csum) { |
@@ -954,7 +954,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev) | |||
954 | 954 | ||
955 | mddev->max_disks = (4096-256)/2; | 955 | mddev->max_disks = (4096-256)/2; |
956 | 956 | ||
957 | if ((le32_to_cpu(sb->feature_map) & 1) && | 957 | if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_BITMAP_OFFSET) && |
958 | mddev->bitmap_file == NULL ) { | 958 | mddev->bitmap_file == NULL ) { |
959 | if (mddev->level != 1) { | 959 | if (mddev->level != 1) { |
960 | printk(KERN_WARNING "md: bitmaps only supported for raid1\n"); | 960 | printk(KERN_WARNING "md: bitmaps only supported for raid1\n"); |
@@ -1029,7 +1029,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1029 | 1029 | ||
1030 | if (mddev->bitmap && mddev->bitmap_file == NULL) { | 1030 | if (mddev->bitmap && mddev->bitmap_file == NULL) { |
1031 | sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset); | 1031 | sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset); |
1032 | sb->feature_map = cpu_to_le32(1); | 1032 | sb->feature_map = cpu_to_le32(MD_FEATURE_BITMAP_OFFSET); |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | max_dev = 0; | 1035 | max_dev = 0; |