lkml.org 
[lkml]   [2008]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: regarding major number of block extended devt
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?

--
tejun


\
 
 \ /
  Last update: 2008-09-04 02:29    [W:0.080 / U:2.576 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site