summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-12-14 12:49:53 +1100
committerNeilBrown <neilb@suse.de>2009-12-14 12:51:41 +1100
commit42a04b5078ce73a32f85762551d5703c5bd646a1 (patch)
tree3ef384933cd33d000516c292712da9a99e273360 /drivers/md/md.c
parentc3d9714e88c8685cf9bc837c3241fc005f95fb82 (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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 63da0a51852..c56c64d1307 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4557,6 +4557,9 @@ out:
mddev->safemode = 0;
mddev->bitmap_info.offset = 0;
mddev->bitmap_info.default_offset = 0;
+ mddev->bitmap_info.chunksize = 0;
+ mddev->bitmap_info.daemon_sleep = 0;
+ mddev->bitmap_info.max_write_behind = 0;
kobject_uevent(&disk_to_dev(mddev->gendisk)->kobj, KOBJ_CHANGE);
if (mddev->hold_active == UNTIL_STOP)
mddev->hold_active = 0;
@@ -6089,14 +6092,14 @@ static int md_seq_show(struct seq_file *seq, void *v)
unsigned long chunk_kb;
unsigned long flags;
spin_lock_irqsave(&bitmap->lock, flags);
- chunk_kb = bitmap->chunksize >> 10;
+ chunk_kb = mddev->bitmap_info.chunksize >> 10;
seq_printf(seq, "bitmap: %lu/%lu pages [%luKB], "
"%lu%s chunk",
bitmap->pages - bitmap->missing_pages,
bitmap->pages,
(bitmap->pages - bitmap->missing_pages)
<< (PAGE_SHIFT - 10),
- chunk_kb ? chunk_kb : bitmap->chunksize,
+ chunk_kb ? chunk_kb : mddev->bitmap_info.chunksize,
chunk_kb ? "KB" : "B");
if (bitmap->file) {
seq_printf(seq, ", file: ");