From: raz ben yehuda <raziebe@gmail.com>
To: NeilBrown <neilb@suse.de>
Cc: Andre Noll <maan@systemlinux.org>, linux-raid@vger.kernel.org
Subject: Subject: PATCH[002:002] md: raid0: dump raid configuration
Date: Thu, 14 May 2009 19:00:09 +0300 [thread overview]
Message-ID: <1242316809.11444.15.camel@raz> (raw)
In-Reply-To: <4743925b38e2d64317e0b6d7c8005a29.squirrel@neil.brown.name>
Tell the user how raid0 looks like.
raid0.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
Signed-Off-by:raziebe@gmail.com
---
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 9865316..2ce81d0 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -267,6 +267,29 @@ static int raid0_is_power2_chunk(mddev_t *mddev)
}
+static void raid0_dump_zones(mddev_t *mddev)
+{
+ int j, k, h;
+ char b[BDEVNAME_SIZE];
+ raid0_conf_t *conf = mddev_to_conf(mddev);
+ printk(KERN_INFO "***** %s configuration ******",
+ mdname(mddev));
+ h = 0;
+ for (j = 0; j < conf->nr_strip_zones; j++) {
+ printk("\nzone%d", j);
+ printk("=[");
+ for (k = 0; k < conf->strip_zone[j].nb_dev; k++)
+ printk("%s/", bdevname(
+ conf->strip_zone[j].dev[k]->bdev, b));
+ printk("]\n\t zone offset=%llu device offset=%llu size=%llukb\n",
+ (unsigned long long)conf->strip_zone[j].zone_start,
+ (unsigned long long)conf->strip_zone[j].dev_start,
+ (unsigned long long)conf->strip_zone[j].sectors>>1);
+ }
+ printk(KERN_INFO "**********************************\n\n");
+}
+
+
static int raid0_run(mddev_t *mddev)
{
int ret;
@@ -317,6 +340,7 @@ static int raid0_run(mddev_t *mddev)
}
blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec);
+ raid0_dump_zones(mddev);
return 0;
}
next prev parent reply other threads:[~2009-05-14 16:00 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 10:43 [PATCH 0/6] md: Remove the hash tables from raid0 Andre Noll
2009-05-14 10:43 ` [PATCH] md: raid0: Replace hash table lookup by looping over all strip_zones Andre Noll
2009-05-14 11:15 ` SandeepKsinha
2009-05-14 11:15 ` NeilBrown
2009-05-14 12:10 ` Andre Noll
2009-05-14 12:25 ` NeilBrown
2009-05-14 12:54 ` Sujit Karataparambil
2009-05-14 15:00 ` SandeepKsinha
2009-05-14 15:58 ` PATCH md [001:002]: raid0: fix chunk size to 4K*n granularity raz ben yehuda
2009-05-14 14:07 ` Andre Noll
2009-05-14 22:35 ` Neil Brown
2009-05-18 22:58 ` raz ben yehuda
2009-05-14 16:00 ` raz ben yehuda [this message]
2009-05-14 17:12 ` Subject: [PATCH] mdadm: raid0: support chunks of 4K*n for raid0 raz ben yehuda
2009-05-15 3:59 ` Sujit Karataparambil
2009-05-15 6:01 ` Raz
2009-05-15 6:45 ` Sujit Karataparambil
2009-05-15 8:39 ` NeilBrown
2009-05-15 15:45 ` Raz
2009-05-14 12:22 ` [PATCH] md: raid0: Replace hash table lookup by looping over all strip_zones Neil Brown
2009-05-14 15:51 ` raz ben yehuda
2009-05-14 20:38 ` NeilBrown
2009-05-15 13:18 ` Andre Noll
2009-05-15 17:30 ` Andre Noll
2009-05-15 21:19 ` Raz
2009-05-18 8:21 ` Andre Noll
2009-05-14 12:01 ` SandeepKsinha
2009-05-14 12:15 ` SandeepKsinha
2009-05-14 14:13 ` raz ben yehuda
2009-05-14 10:43 ` [PATCH] md: raid0: Remove hash table Andre Noll
2009-05-14 10:43 ` [PATCH] md: raid0: Remove hash spacing and sector shift Andre Noll
2009-05-14 10:43 ` [PATCH] md: raid0: Make raid0_run() return a proper error code Andre Noll
2009-05-14 11:21 ` NeilBrown
2009-05-14 11:42 ` Andre Noll
2009-05-14 10:43 ` [PATCH] md: raid0: Kfree() strip_zone and devlist in create_strip_zones() Andre Noll
2009-05-14 10:43 ` [PATCH] md: raid0: Simplify raid0_run() Andre Noll
2009-05-14 11:43 ` SandeepKsinha
2009-05-14 12:06 ` NeilBrown
2009-05-14 14:03 ` raz ben yehuda
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=1242316809.11444.15.camel@raz \
--to=raziebe@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=maan@systemlinux.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).