[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080904115052.GF20055@kernel.dk>
Date: Thu, 4 Sep 2008 13:50:52 +0200
From: Jens Axboe <jens.axboe@...cle.com>
To: Tejun Heo <tj@...nel.org>
Cc: "H. Peter Anvin" <hpa@...or.com>, device@...ana.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: regarding major number of block extended devt
On Thu, Sep 04 2008, Tejun Heo wrote:
> Hello,
>
> H. Peter Anvin wrote:
> > Thinking about it some more, one invariant this is *guaranteed* to
> > violate is:
> >
> > partition_number = partition_device - master_device
> >
> > Code that needs a partition number (which is common enough) are using
> > this invariant, because (a) it has held for 17 years and (b) because
> > there is still no alternative other that relying on fragile naming
> > scheme hacks.
> >
> > (a) we can't do anything about, but (b) we can, by introducing a
> > partition number attribute in sysfs.
>
> Yeah, that would certainly be a nice addition. Also, if partitions
> are made proper classes, they'll be easily enumerable by
> /sys/block/*/partitions/*.
>
> Jens, what do you think?
Agree, that addition definitely makes sense.
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists