aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r--drivers/md/raid0.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 77764dad1bcb..d8692fc17963 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -400,7 +400,7 @@ bad_map:
400 return 0; 400 return 0;
401} 401}
402 402
403static void raid0_status (struct seq_file *seq, mddev_t *mddev) 403static void raid0_status(struct seq_file *seq, mddev_t *mddev)
404{ 404{
405#undef MD_DEBUG 405#undef MD_DEBUG
406#ifdef MD_DEBUG 406#ifdef MD_DEBUG
@@ -408,18 +408,24 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev)
408 char b[BDEVNAME_SIZE]; 408 char b[BDEVNAME_SIZE];
409 raid0_conf_t *conf = mddev->private; 409 raid0_conf_t *conf = mddev->private;
410 410
411 sector_t zone_size;
412 sector_t zone_start = 0;
411 h = 0; 413 h = 0;
414
412 for (j = 0; j < conf->nr_strip_zones; j++) { 415 for (j = 0; j < conf->nr_strip_zones; j++) {
413 seq_printf(seq, " z%d", j); 416 seq_printf(seq, " z%d", j);
414 seq_printf(seq, "=["); 417 seq_printf(seq, "=[");
415 for (k = 0; k < conf->strip_zone[j].nb_dev; k++) 418 for (k = 0; k < conf->strip_zone[j].nb_dev; k++)
416 seq_printf(seq, "%s/", bdevname( 419 seq_printf(seq, "%s/", bdevname(
417 conf->strip_zone[j].dev[k]->bdev,b)); 420 conf->devlist[j*mddev->raid_disks + k]
418 421 ->bdev, b));
419 seq_printf(seq, "] ze=%d ds=%d s=%d\n", 422
420 conf->strip_zone[j].zone_end, 423 zone_size = conf->strip_zone[j].zone_end - zone_start;
421 conf->strip_zone[j].dev_start, 424 seq_printf(seq, "] ze=%lld ds=%lld s=%lld\n",
422 conf->strip_zone[j].sectors); 425 (unsigned long long)zone_start>>1,
426 (unsigned long long)conf->strip_zone[j].dev_start>>1,
427 (unsigned long long)zone_size>>1);
428 zone_start = conf->strip_zone[j].zone_end;
423 } 429 }
424#endif 430#endif
425 seq_printf(seq, " %dk chunks", mddev->chunk_size/1024); 431 seq_printf(seq, " %dk chunks", mddev->chunk_size/1024);