diff options
author | raz ben yehuda <raziebe@gmail.com> | 2009-06-16 03:00:54 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-06-16 03:00:54 -0400 |
commit | 46994191ae8fdf1cbcc1f29282576b269a638c69 (patch) | |
tree | bb9b62ca26cb5fb13122e58c4681eca73accabad /drivers/md/raid0.c | |
parent | 1b9614291eb319fad96de45392eb4452ad39f0ee (diff) |
md: have raid0 report its formation
Report to the user what are the raid zones
Signed-off-by: raziebe@gmail.com
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index d8692fc17963..62fde23bf281 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -52,6 +52,38 @@ static int raid0_congested(void *data, int bits) | |||
52 | return ret; | 52 | return ret; |
53 | } | 53 | } |
54 | 54 | ||
55 | /* | ||
56 | * inform the user of the raid configuration | ||
57 | */ | ||
58 | static void dump_zones(mddev_t *mddev) | ||
59 | { | ||
60 | int j, k, h; | ||
61 | sector_t zone_size = 0; | ||
62 | sector_t zone_start = 0; | ||
63 | char b[BDEVNAME_SIZE]; | ||
64 | raid0_conf_t *conf = mddev->private; | ||
65 | printk(KERN_INFO "******* %s configuration *********\n", | ||
66 | mdname(mddev)); | ||
67 | h = 0; | ||
68 | for (j = 0; j < conf->nr_strip_zones; j++) { | ||
69 | printk(KERN_INFO "zone%d=[", j); | ||
70 | for (k = 0; k < conf->strip_zone[j].nb_dev; k++) | ||
71 | printk("%s/", | ||
72 | bdevname(conf->devlist[j*mddev->raid_disks | ||
73 | + k]->bdev, b)); | ||
74 | printk("]\n"); | ||
75 | |||
76 | zone_size = conf->strip_zone[j].zone_end - zone_start; | ||
77 | printk(KERN_INFO " zone offset=%llukb " | ||
78 | "device offset=%llukb size=%llukb\n", | ||
79 | (unsigned long long)zone_start>>1, | ||
80 | (unsigned long long)conf->strip_zone[j].dev_start>>1, | ||
81 | (unsigned long long)zone_size>>1); | ||
82 | zone_start = conf->strip_zone[j].zone_end; | ||
83 | } | ||
84 | printk(KERN_INFO "**********************************\n\n"); | ||
85 | } | ||
86 | |||
55 | static int create_strip_zones(mddev_t *mddev) | 87 | static int create_strip_zones(mddev_t *mddev) |
56 | { | 88 | { |
57 | int i, c, j, err; | 89 | int i, c, j, err; |
@@ -289,6 +321,7 @@ static int raid0_run(mddev_t *mddev) | |||
289 | } | 321 | } |
290 | 322 | ||
291 | blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec); | 323 | blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec); |
324 | dump_zones(mddev); | ||
292 | return 0; | 325 | return 0; |
293 | } | 326 | } |
294 | 327 | ||