diff options
author | NeilBrown <neilb@suse.de> | 2009-12-13 20:49:53 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-12-13 20:51:41 -0500 |
commit | 42a04b5078ce73a32f85762551d5703c5bd646a1 (patch) | |
tree | 3ef384933cd33d000516c292712da9a99e273360 /drivers/md/md.c | |
parent | c3d9714e88c8685cf9bc837c3241fc005f95fb82 (diff) |
md: move offset, daemon_sleep and chunksize out of bitmap structure
... and into bitmap_info. These are all configuration parameters
that need to be set before the bitmap is created.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 63da0a51852d..c56c64d13075 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -4557,6 +4557,9 @@ out: | |||
4557 | mddev->safemode = 0; | 4557 | mddev->safemode = 0; |
4558 | mddev->bitmap_info.offset = 0; | 4558 | mddev->bitmap_info.offset = 0; |
4559 | mddev->bitmap_info.default_offset = 0; | 4559 | mddev->bitmap_info.default_offset = 0; |
4560 | mddev->bitmap_info.chunksize = 0; | ||
4561 | mddev->bitmap_info.daemon_sleep = 0; | ||
4562 | mddev->bitmap_info.max_write_behind = 0; | ||
4560 | kobject_uevent(&disk_to_dev(mddev->gendisk)->kobj, KOBJ_CHANGE); | 4563 | kobject_uevent(&disk_to_dev(mddev->gendisk)->kobj, KOBJ_CHANGE); |
4561 | if (mddev->hold_active == UNTIL_STOP) | 4564 | if (mddev->hold_active == UNTIL_STOP) |
4562 | mddev->hold_active = 0; | 4565 | mddev->hold_active = 0; |
@@ -6089,14 +6092,14 @@ static int md_seq_show(struct seq_file *seq, void *v) | |||
6089 | unsigned long chunk_kb; | 6092 | unsigned long chunk_kb; |
6090 | unsigned long flags; | 6093 | unsigned long flags; |
6091 | spin_lock_irqsave(&bitmap->lock, flags); | 6094 | spin_lock_irqsave(&bitmap->lock, flags); |
6092 | chunk_kb = bitmap->chunksize >> 10; | 6095 | chunk_kb = mddev->bitmap_info.chunksize >> 10; |
6093 | seq_printf(seq, "bitmap: %lu/%lu pages [%luKB], " | 6096 | seq_printf(seq, "bitmap: %lu/%lu pages [%luKB], " |
6094 | "%lu%s chunk", | 6097 | "%lu%s chunk", |
6095 | bitmap->pages - bitmap->missing_pages, | 6098 | bitmap->pages - bitmap->missing_pages, |
6096 | bitmap->pages, | 6099 | bitmap->pages, |
6097 | (bitmap->pages - bitmap->missing_pages) | 6100 | (bitmap->pages - bitmap->missing_pages) |
6098 | << (PAGE_SHIFT - 10), | 6101 | << (PAGE_SHIFT - 10), |
6099 | chunk_kb ? chunk_kb : bitmap->chunksize, | 6102 | chunk_kb ? chunk_kb : mddev->bitmap_info.chunksize, |
6100 | chunk_kb ? "KB" : "B"); | 6103 | chunk_kb ? "KB" : "B"); |
6101 | if (bitmap->file) { | 6104 | if (bitmap->file) { |
6102 | seq_printf(seq, ", file: "); | 6105 | seq_printf(seq, ", file: "); |