Re: /proc/partitions broken in 2.5.23

Dave Jones (davej@suse.de)
Fri, 21 Jun 2002 01:34:36 +0200


On Fri, Jun 21, 2002 at 01:21:40AM +0200, Andries.Brouwer@cwi.nl wrote:

> > I got a bug report about an issue with LVM in 2.5.22-dj1, which turns
> > out to be caused by broken /proc/partitions in mainline.
> >
> > (davej@mesh:davej)$ cat /proc/partitions
> > major minor #blocks name
> >
> > 8 0 0 sda
> > 22 0 1515870810 hdc
> >
> > Note the huge numbers in hex are 0x5a5a5a5a, so something
> > seems to be getting poisoned somewhere.
>
> Is this LVM?

No.

> I don't see how LVM could produce such values.
> (And in fact LVM does not even compile, so only a patched LVM
> could produce anything at all.)

The original person who reported a problem to me used LVM, and
in the course of discussion, the proc/partitions bug came to light.
The values pasted above are from a box with no LVM compiled.

> Normally the nr_real field indicates how many devices are
> present. But LVM sets that to 256 even when nothing is present.
> So, indeed, when all size fields are set to 0 this would probably
> yield a list of 256 absent LVM devices.
> Maybe LVM has to be fixed, or this patch fragment reverted, or both.

As I mentioned in another mail, it seems that removable devices with
no media have no valid #blocks, and is thus getting poisoned.

Dave

-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/