aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-03-18 21:46:40 -0400
committerNeilBrown <neilb@suse.de>2012-03-18 21:46:40 -0400
commit57148964d946614ffc6621539096ded1e7d896ab (patch)
treed4bdadf58d740fcdb3c65063a5706cc3902f2b9b /drivers/md/md.c
parent4ba97dff719b4cbeb7a4f6beddd2feb7404102d8 (diff)
md/bitmap: move printing of bitmap status to bitmap.c
The part of /proc/mdstat which describes the bitmap should really be generated by code in bitmap.c. So move it there. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4566b61373d5..26591cc8ee87 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6725,7 +6725,6 @@ static int md_seq_show(struct seq_file *seq, void *v)
6725 struct mddev *mddev = v; 6725 struct mddev *mddev = v;
6726 sector_t sectors; 6726 sector_t sectors;
6727 struct md_rdev *rdev; 6727 struct md_rdev *rdev;
6728 struct bitmap *bitmap;
6729 6728
6730 if (v == (void*)1) { 6729 if (v == (void*)1) {
6731 struct md_personality *pers; 6730 struct md_personality *pers;
@@ -6813,27 +6812,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
6813 } else 6812 } else
6814 seq_printf(seq, "\n "); 6813 seq_printf(seq, "\n ");
6815 6814
6816 if ((bitmap = mddev->bitmap)) { 6815 bitmap_status(seq, mddev->bitmap);
6817 unsigned long chunk_kb;
6818 unsigned long flags;
6819 spin_lock_irqsave(&bitmap->lock, flags);
6820 chunk_kb = mddev->bitmap_info.chunksize >> 10;
6821 seq_printf(seq, "bitmap: %lu/%lu pages [%luKB], "
6822 "%lu%s chunk",
6823 bitmap->pages - bitmap->missing_pages,
6824 bitmap->pages,
6825 (bitmap->pages - bitmap->missing_pages)
6826 << (PAGE_SHIFT - 10),
6827 chunk_kb ? chunk_kb : mddev->bitmap_info.chunksize,
6828 chunk_kb ? "KB" : "B");
6829 if (bitmap->file) {
6830 seq_printf(seq, ", file: ");
6831 seq_path(seq, &bitmap->file->f_path, " \t\n");
6832 }
6833
6834 seq_printf(seq, "\n");
6835 spin_unlock_irqrestore(&bitmap->lock, flags);
6836 }
6837 6816
6838 seq_printf(seq, "\n"); 6817 seq_printf(seq, "\n");
6839 } 6818 }