Commit 6cce3b23 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] md: write intent bitmap support for raid10

Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b15c2e57
...@@ -714,9 +714,10 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev) ...@@ -714,9 +714,10 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev)
if (sb->state & (1<<MD_SB_BITMAP_PRESENT) && if (sb->state & (1<<MD_SB_BITMAP_PRESENT) &&
mddev->bitmap_file == NULL) { mddev->bitmap_file == NULL) {
if (mddev->level != 1 && mddev->level != 5 && mddev->level != 6) { if (mddev->level != 1 && mddev->level != 5 && mddev->level != 6
&& mddev->level != 10) {
/* FIXME use a better test */ /* FIXME use a better test */
printk(KERN_WARNING "md: bitmaps only support for raid1\n"); printk(KERN_WARNING "md: bitmaps not supported for this level.\n");
return -EINVAL; return -EINVAL;
} }
mddev->bitmap_offset = mddev->default_bitmap_offset; mddev->bitmap_offset = mddev->default_bitmap_offset;
...@@ -1037,8 +1038,9 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev) ...@@ -1037,8 +1038,9 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_BITMAP_OFFSET) && if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_BITMAP_OFFSET) &&
mddev->bitmap_file == NULL ) { mddev->bitmap_file == NULL ) {
if (mddev->level != 1) { if (mddev->level != 1 && mddev->level != 5 && mddev->level != 6
printk(KERN_WARNING "md: bitmaps only supported for raid1\n"); && mddev->level != 10) {
printk(KERN_WARNING "md: bitmaps not supported for this level.\n");
return -EINVAL; return -EINVAL;
} }
mddev->bitmap_offset = (__s32)le32_to_cpu(sb->bitmap_offset); mddev->bitmap_offset = (__s32)le32_to_cpu(sb->bitmap_offset);
......
This diff is collapsed.
...@@ -35,13 +35,19 @@ struct r10_private_data_s { ...@@ -35,13 +35,19 @@ struct r10_private_data_s {
sector_t chunk_mask; sector_t chunk_mask;
struct list_head retry_list; struct list_head retry_list;
/* for use when syncing mirrors: */ /* queue pending writes and submit them on unplug */
struct bio_list pending_bio_list;
spinlock_t resync_lock; spinlock_t resync_lock;
int nr_pending; int nr_pending;
int nr_waiting; int nr_waiting;
int barrier; int barrier;
sector_t next_resync; sector_t next_resync;
int fullsync; /* set to 1 if a full sync is needed,
* (fresh device added).
* Cleared when a sync completes.
*/
wait_queue_head_t wait_barrier; wait_queue_head_t wait_barrier;
...@@ -100,4 +106,5 @@ struct r10bio_s { ...@@ -100,4 +106,5 @@ struct r10bio_s {
#define R10BIO_Uptodate 0 #define R10BIO_Uptodate 0
#define R10BIO_IsSync 1 #define R10BIO_IsSync 1
#define R10BIO_IsRecover 2 #define R10BIO_IsRecover 2
#define R10BIO_Degraded 3
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment