Re: Parition Slices

Guest section DW (dwguest@win.tue.nl)
Mon, 8 Mar 1999 13:52:15 +0100 (MET)


From: Richard Gooch <rgooch@atnf.csiro.au>

> Yes, as far as I know "slices" can be both primary (dos
> incompatibile) or be "fit" into a dos partition.

Ouch. All right, I suppose there is a case to be made for coming up
with a comprehensive partition/slice naming scheme. The partition
scanning code is going to have to be modified.

I'll welcome anyone who wants to step forward and tackle this monster.

My point of view is that you take a disk, apply some partition
scheme and find a bunch of subdisks. Each of these can again
be viewed as disk, may carry some partition scheme and have
subsubdisks. Etc.

So, the monster is rather tame: you need a name for the partitioning scheme;
and given the scheme you need names (probably ordinal numbers) for the parts.
Now apply this recursively.

If the disk is called hdc and has a DOS partition scheme
for example like

/dev/hdc1 * 1 6 1207 a OS/2 Boot Manager
/dev/hdc2 7 923 187068 6 FAT16
/dev/hdc3 924 1000 15708 11 Hidden FAT12
/dev/hdc4 1001 1023 4692 a5 BSD/386

then part 4 might be called hdc_D4. Now if this BSD thing there
is subdivided:

8 partitions:
# size offset fstype [fsize bsize cpg]
c: 9384 408000 unused 0 0 # (Cyl. 1001 - 1023)
e: 9384 408000 4.2BSD 0 0 0 # (Cyl. 1001 - 1023)

this last part may be called hdc_D4_Be. Etc.

Assigning names following some reasonable scheme is not so difficult.
Assigning majors and minors is a bit messier because that seems
to require flattening the implicit tree here, and there is no
canonical way. For the moment our aim should be to do a breadth
first search. With 64-bit device numbers more is possible.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/