Re: Filesystem creation

Riley Williams
2002-05-15T17:05:55Z

Hi Harry.

>>> The mkfs utility needs the size to be specified because block
>>> devices in ELKS do not update the blk_sizes array. (Remember
>>> the swap discussion).

>> Weren't you the one who posted the update to correct that ? It is
>> really simple error and should be fixed immediately (i can't think
>> of any reason for _not_ fixing it).

> No I just spoted it, didn't fix it! The only problem that I can see
> is that the blk_sizes is an array with the one dimension being the
> major and the other the minor device number. This is probably a
> waste of data segment in the case of ELKS. That is the only reason I
> can see, that made the developers comment out the source the
> blk_sizes references.

I've now had a look at both the doshd.c and rd.c source files, and the
ONLY references I can find resembling what you're discussing are to the
blksize_size array. This is only a one dimensional array indexed by
MAJOR_NR, and appears to contain the size of the block rather than the
number of blocks as per this discussion. In both doshd.c and rd.c it's
set to 1024 in the initialisation routine (or at least, it would be if
the relevent lines weren't #if 0'd out altogether) and is then never
used at all therein.

Does anybody have any documentation on the expected API for new block
devices? If not, I'll try to write one based on the kernel source, then
I might just have an idea what is going on here. I certainly don't at
the moment.

Best wishes from Riley.