From: Erik Andersen <andersen@codepoet.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.4.20-pre[234] hosed /proc/partitions fix
Date: Wed, 21 Aug 2002 08:06:15 -0600 [thread overview]
Message-ID: <20020821140615.GA20137@codepoet.org> (raw)
In-Reply-To: <1029937506.26411.29.camel@irongate.swansea.linux.org.uk>
On Wed Aug 21, 2002 at 02:45:06PM +0100, Alan Cox wrote:
> On Wed, 2002-08-21 at 04:04, Erik Andersen wrote:
> > On Tue Aug 20, 2002 at 08:27:32PM -0600, Erik wrote:
> > > Try compiling CONFIG_BLK_DEV_LVM into 2.4.20-pre4 and then run
> > > 'cat /proc/partitions' for some amusement. I really like the way
> >
> > It also seems to occur for md and ataraid.
>
> Fixed in -ac for a while - not had time to do another sync with Marcelo
> though
Sigh. I wished I'd known an hour ago, since it would have
saved me the bother of figuring it out myself.
Marcello,
Please apply the following patch to 2.4.20-pre5. The
patch that went into -pre2 had a nasty bug in it that
causes /proc/partitions to behave very badly. This
patch restores it to sanity.
--- drivers/block/genhd.c.orig Wed Aug 21 07:51:21 2002
+++ drivers/block/genhd.c Wed Aug 21 08:03:48 2002
@@ -194,9 +194,7 @@
/* show the full disk and all non-0 size partitions of it */
for (n = 0; n < (gp->nr_real << gp->minor_shift); n++) {
- int mask = (1<<gp->minor_shift) - 1;
-
- if (!(n & mask) || gp->part[n].nr_sects) {
+ if (gp->part[n].nr_sects) {
#ifdef CONFIG_BLK_STATS
struct hd_struct *hd = &gp->part[n];
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
prev parent reply other threads:[~2002-08-21 14:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-21 2:27 2.4.20-pre4 + LVM = hosed /proc/partitions Erik Andersen
2002-08-21 3:04 ` Erik Andersen
2002-08-21 3:21 ` Jeff Chua
2002-08-21 3:26 ` Erik Andersen
2002-08-21 13:45 ` Alan Cox
2002-08-21 14:06 ` Erik Andersen [this message]
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=20020821140615.GA20137@codepoet.org \
--to=andersen@codepoet.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.