Re: Filesystem creation

Riley Williams
2002-05-14T12:44:32Z

Hi Alan.

>> 2. How hard would it be to make mkfs take as its size parameter
>> the number reported by fdisk and calculate the size it needs
>> from that rather than expect the user to do the calculation
>> instead?

> That would break the expected but daft old Unix API

I have to admit that I didn't even know there was a Unix API to break,
and from a personal viewpoint I'd be a lot more interested in building
compatibility to the current Linux system on the assumption that if the
API is important in the Unix world as a whole, then Linux will already
follow it, and if Linux doesn't, then the API can't be that important.

>> 3. How hard would it be to fix ELKS so the size doesn't need to
>> be specified, either by getting the block devices to update
>> the blk_sizes array or by whatever other means are required?
>> This way, the whole problem just vanishes.

> You can fill in the block sizes for each partition by reading the
> partition table.

Alternatively, and according to Blaz, it's only the RamDrive driver that
fails to provide this information already, so if we correct that bug
(which I'm looking into now), then mkfs can already get all it needs
from the current drivers and the problem just evaporates.

> In the ELKS case I'd argue that mkfs ought to figure out the primary
> device, and do the partition table read itself simply because kernel
> space is precious and only mkfoo need to know

I could certainly agree with that argument if there was lots to insert
in the ELKS kernel code to support it, but such is claimed not to be the
case. I'll let you know what I find out anyway.

Best wishes from Riley.