From: raz ben yehuda <raziebe@gmail.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Subject: [PATCH 1/6] md: raid0 to compile when MD DEBUG is on
Date: Tue, 19 May 2009 02:00:04 +0300 [thread overview]
Message-ID: <1242687604.21201.7.camel@raz> (raw)
In-Reply-To: <20090516115731.14596.16948.stgit@notabene.brown>
Because of the removal the device list from
the strips raid0 did not compile with MD_DEBUG flag on.
commit is stacked on top of:
commit 747df02a154401948426050979b061446eadc37e
Author: NeilBrown <neilb@suse.de>
Date: Sat May 16 21:51:51 2009 +1000
raid0.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
Signed-off-by: raziebe@gmail.com
---
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 86249c5..df224ae 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -402,26 +402,29 @@ 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
int j, k, h;
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[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);
next prev parent reply other threads:[~2009-05-18 23:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090516115726.14596.58766.stgit@notabene.brown>
2009-05-16 11:57 ` [md PATCH 2/2] md: raid0: remove ->dev pointer from strip_zone structure NeilBrown
2009-05-18 23:00 ` raz ben yehuda [this message]
2009-05-18 23:43 ` Subject: [PATCH 1/6] md: raid0 to compile when MD DEBUG is on Neil Brown
2009-05-16 11:57 ` [md PATCH 1/2] md: raid0: remove ->sectors from the strip_zone structure NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242687604.21201.7.camel@raz \
--to=raziebe@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).