tech-kern archive

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

Re: In-kernel units for block numbers, etc ...



kre%munnari.OZ.AU@localhost (Robert Elz) writes:

>It is easy to see why this happens in the CGD source, I think there's
>even an XXX comment that is related ... an easy "fix" would just be to
>multiply the size by 8 (by the appropriate factor really, of course) 
>but that then makes the CGD look like it is a 512 bye/sec device, which
>would permit 512 byte reads on odd boundaries, which the underlying drive
>cannot handle.


You need to copy the sector size from the underlying disk and you
need to fix a few cases where DEV_BSIZE is used for buffer sizes.


>So, all block numbers in a FFS (even on a 4k sector disk) would still be
>in DEV_BSIZE units, they'd just always be conveniently multiples of 8...

Actually FFS calculates everything in fragment addresses and converts
these to DEV_BSIZE addresses when passing to the device driver.


-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index