diff options
author | raz ben yehuda <raziebe@gmail.com> | 2009-06-16 16:57:40 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-06-16 16:57:40 +1000 |
commit | 1b9614291eb319fad96de45392eb4452ad39f0ee (patch) | |
tree | 0662e5f234eb238e78a2c5d08e35033ee1141d05 /drivers/md | |
parent | aece3d1f40879759f641dfbfdbb9e2593adeb43c (diff) | |
download | linux-1b9614291eb319fad96de45392eb4452ad39f0ee.tar.bz2 |
md: have raid0 compile with MD_DEBUG on
Because of the removal of the device list from
the strips raid0 did not compile with MD_DEBUG flag on
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid0.c | 20 |
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: return 0; } -static void raid0_status (struct seq_file *seq, mddev_t *mddev) +static void raid0_status(struct seq_file *seq, mddev_t *mddev) { #undef MD_DEBUG #ifdef MD_DEBUG @@ -408,18 +408,24 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev) char b[BDEVNAME_SIZE]; raid0_conf_t *conf = mddev->private; + sector_t zone_size; + sector_t zone_start = 0; h = 0; + for (j = 0; j < conf->nr_strip_zones; j++) { seq_printf(seq, " z%d", j); seq_printf(seq, "=["); for (k = 0; k < conf->strip_zone[j].nb_dev; k++) seq_printf(seq, "%s/", bdevname( - conf->strip_zone[j].dev[k]->bdev,b)); - - seq_printf(seq, "] ze=%d ds=%d s=%d\n", - conf->strip_zone[j].zone_end, - conf->strip_zone[j].dev_start, - conf->strip_zone[j].sectors); + conf->devlist[j*mddev->raid_disks + k] + ->bdev, b)); + + zone_size = conf->strip_zone[j].zone_end - zone_start; + seq_printf(seq, "] ze=%lld ds=%lld s=%lld\n", + (unsigned long long)zone_start>>1, + (unsigned long long)conf->strip_zone[j].dev_start>>1, + (unsigned long long)zone_size>>1); + zone_start = conf->strip_zone[j].zone_end; } #endif seq_printf(seq, " %dk chunks", mddev->chunk_size/1024); |