aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-01-06 03:20:16 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:34:03 -0500
commit6cce3b23f6f8e974c00af7a9b88f1d413ba368a8 (patch)
tree8c156f26a10de82b1626d74f810704cfd6f5ba2b /drivers/md/md.c
parentb15c2e57f0f5bf596a19e9c5571e5b07cdfc7363 (diff)
[PATCH] md: write intent bitmap support for raid10
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ee199d462520..64e7da3701a5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -714,9 +714,10 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev)
714 714
715 if (sb->state & (1<<MD_SB_BITMAP_PRESENT) && 715 if (sb->state & (1<<MD_SB_BITMAP_PRESENT) &&
716 mddev->bitmap_file == NULL) { 716 mddev->bitmap_file == NULL) {
717 if (mddev->level != 1 && mddev->level != 5 && mddev->level != 6) { 717 if (mddev->level != 1 && mddev->level != 5 && mddev->level != 6
718 && mddev->level != 10) {
718 /* FIXME use a better test */ 719 /* FIXME use a better test */
719 printk(KERN_WARNING "md: bitmaps only support for raid1\n"); 720 printk(KERN_WARNING "md: bitmaps not supported for this level.\n");
720 return -EINVAL; 721 return -EINVAL;
721 } 722 }
722 mddev->bitmap_offset = mddev->default_bitmap_offset; 723 mddev->bitmap_offset = mddev->default_bitmap_offset;
@@ -1037,8 +1038,9 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
1037 1038
1038 if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_BITMAP_OFFSET) && 1039 if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_BITMAP_OFFSET) &&
1039 mddev->bitmap_file == NULL ) { 1040 mddev->bitmap_file == NULL ) {
1040 if (mddev->level != 1) { 1041 if (mddev->level != 1 && mddev->level != 5 && mddev->level != 6
1041 printk(KERN_WARNING "md: bitmaps only supported for raid1\n"); 1042 && mddev->level != 10) {
1043 printk(KERN_WARNING "md: bitmaps not supported for this level.\n");
1042 return -EINVAL; 1044 return -EINVAL;
1043 } 1045 }
1044 mddev->bitmap_offset = (__s32)le32_to_cpu(sb->bitmap_offset); 1046 mddev->bitmap_offset = (__s32)le32_to_cpu(sb->bitmap_offset);