Re: 2.5.28 and partitions

Alexander Viro
2002-07-31T22:35:43Z

On Thu, 1 Aug 2002, Peter Chubb wrote:

> Maybe we need to roll our own? I suggest something like:
> struct linux_volume_header {
> char volname[16];
> __u32 nparts;
> __u32 blocksize;
> struct linux_partition {
> char partname[16]
> __u64 start;
> __u64 len;
> __u32 usage;
> __u32 flags;
> } parts[]
> }

Oh, ferchrissake! WHY??? People, we'd seen a lot of demonstrations
of the reasons why binary structures are *bad* for such stuff.

What the bleedin' hell is wrong with <name> <start> <len>\n - all in ASCII?
Terminated by \0. No need for flags, no need for endianness crap, no
need to worry about field becoming too narrow...

What, parsing that would be too slow? Right. Sure. How many times do
we parse partition table? How many times do we end up reading it from
disk? How does IO time compare to the "overhead" of trivial sscanf loop?

Furrfu... "ASCII is tough, let's go shopping"...