tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding an ioctl to check for disklabel existence



>> If _that_'s what you're concerned about, then just grow the relevant
>> fields (and, presumably, change the magic number).
> Any change to the label format or semantics would make it be a
> completely different object, no longer compatible with anything.

Of course.

> If we were going to invent something new that way, we may as well
> make it lots better - and ideally compatible with other systems so we
> can read one another's drives.

> That's what GPT is, and it is already supported.

Except for the "better" part, which is a matter of opinion.  I don't
care for GPT.

- Partitions are huge.  128 bytes, when you actually need maybe 18 (and
   about a quarter of even that is pure future-proofing paranoia).

- Partition types are UUIDs.  Why use 16 bytes when you have, in the
   information-theoretic sense, maybe three bits of information?
   (At least, I can't recall the last time I used a partition type
   other than FFS, unused, swap, MSDOS, or NTFS - and NTFS only for
   trying to figure out what's on Windows disks.  Six bits, maybe,
   based on doubling the number of types I see in disklabel_gpt.h.  My
   "18" above assumes 16 bits.)

- Partition names(!) are character strings, rather than octet strings
   or integers (an encoding is specified).  This mandates a lot of
   character-handling crap that does not belong in boot blocks and
   arguably does not belong in operating systems.  It most certainly is
   not appropriate for the partition table format to mandate/demand the
   presence of Unicode support in the operating system.

It does have one nice thing, a (supposedly-)unique partition
identifier.  (Of course, nothing can ensure this actually _is_ unique;
if nothing else, cloning an entire disk will perforce clone these
`unique' IDs.)  But it doesn't need to be 16 bytes long!  Even adding
14 bytes of partition ID to the 18 bytes above still comes out to only
a quarter of the space GPT burns on each partition.

> Why would we want to invent something new, just to be different?

No, not to be different.  To be better.

Except, of course, that (I assume) you don't think it _would_ be
better.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index