提交 1b961429 编写于 作者: R raz ben yehuda 提交者: NeilBrown

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: NNeilBrown <neilb@suse.de>
上级 aece3d1f
...@@ -400,7 +400,7 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio) ...@@ -400,7 +400,7 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio)
return 0; 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 #undef MD_DEBUG
#ifdef MD_DEBUG #ifdef MD_DEBUG
...@@ -408,18 +408,24 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev) ...@@ -408,18 +408,24 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev)
char b[BDEVNAME_SIZE]; char b[BDEVNAME_SIZE];
raid0_conf_t *conf = mddev->private; raid0_conf_t *conf = mddev->private;
sector_t zone_size;
sector_t zone_start = 0;
h = 0; h = 0;
for (j = 0; j < conf->nr_strip_zones; j++) { for (j = 0; j < conf->nr_strip_zones; j++) {
seq_printf(seq, " z%d", j); seq_printf(seq, " z%d", j);
seq_printf(seq, "=["); seq_printf(seq, "=[");
for (k = 0; k < conf->strip_zone[j].nb_dev; k++) for (k = 0; k < conf->strip_zone[j].nb_dev; k++)
seq_printf(seq, "%s/", bdevname( seq_printf(seq, "%s/", bdevname(
conf->strip_zone[j].dev[k]->bdev,b)); conf->devlist[j*mddev->raid_disks + k]
->bdev, b));
seq_printf(seq, "] ze=%d ds=%d s=%d\n",
conf->strip_zone[j].zone_end, zone_size = conf->strip_zone[j].zone_end - zone_start;
conf->strip_zone[j].dev_start, seq_printf(seq, "] ze=%lld ds=%lld s=%lld\n",
conf->strip_zone[j].sectors); (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 #endif
seq_printf(seq, " %dk chunks", mddev->chunk_size/1024); seq_printf(seq, " %dk chunks", mddev->chunk_size/1024);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册