From: NeilBrown <neilb@cse.unsw.edu.au>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] md - 7 of 7 - Make sure md devices appear in /proc/partitions
Date: Fri, 23 Jan 2004 11:14:25 +1100 [thread overview]
Message-ID: <E1Ajoxt-0000kB-00@notabene> (raw)
In-Reply-To: 20040123105615.2237.patches@notabene
As they are not partitionable, they don't (how wierd).
----------- Diffstat output ------------
./drivers/block/genhd.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff ./drivers/block/genhd.c~current~ ./drivers/block/genhd.c
--- ./drivers/block/genhd.c~current~ 2004-01-23 10:30:07.000000000 +1100
+++ ./drivers/block/genhd.c 2004-01-23 10:48:23.000000000 +1100
@@ -261,8 +261,14 @@ static int show_partition(struct seq_fil
seq_puts(part, "major minor #blocks name\n\n");
/* Don't show non-partitionable devices or empty devices */
- if (!get_capacity(sgp) || sgp->minors == 1)
- return 0;
+ /* ... but do show 'md' devices. As it isn't clear *why*
+ * non-partitionable devices are excluded, and as I definately
+ * want md device to be included, the follow ugly code is
+ * needed - neilb Jan2004
+ */
+ if (sgp->disk_name[0] != 'm' || sgp->disk_name[1] != 'd')
+ if (!get_capacity(sgp) || sgp->minors == 1)
+ return 0;
/* show the full disk and all non-0 size partitions of it */
seq_printf(part, "%4d %4d %10llu %s\n",
next prev parent reply other threads:[~2004-01-23 0:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-23 0:13 [PATCH] md - 0 of 7 - Introduction NeilBrown
2004-01-23 0:14 ` [PATCH] md - 2 of 7 - Move the test in preferred_minor to where it is used NeilBrown
2004-01-23 0:14 ` [PATCH] md - 1 of 7 - Fix possible hang in raid shutdown NeilBrown
2004-01-23 0:14 ` [PATCH] md - 4 of 7 - Collect device IO statistics for MD personalities NeilBrown
2004-01-23 0:14 ` [PATCH] md - 5 of 7 - Change the way the name of an md device is printed in error messages NeilBrown
2004-01-23 0:14 ` [PATCH] md - 3 of 7 - Fixes to make debuging output nicer NeilBrown
2004-01-23 0:14 ` NeilBrown [this message]
2004-01-23 0:14 ` [PATCH] md - 6 of 7 - Allow partitioning of MD devices 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=E1Ajoxt-0000kB-00@notabene \
--to=neilb@cse.unsw.edu.au \
--cc=akpm@osdl.org \
--cc=linux-raid@vger.kernel.org \
/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).