tech-kern archive

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

Re: blocksizes

On Fri, Jan 22, 2010 at 02:28:07PM +0700, Robert Elz wrote:
>     Date:        Fri, 22 Jan 2010 08:07:03 +0100
>     From:        Michael van Elst <>
>     Message-ID:  <>
>   | except that there a lot of assumptions that
>   | physical block size is the same as DEV_BSIZE.
> Is that really true these days?   I believe there are assumptions that
> the physical block size is no smaller than DEV_BSIZE (or more correctly,
> that if the physical size is smaller, the driver will hide that fact), but
> anything that is assuming that they are identical is most probably just a bug,
> that assumption was supposed to have been removed ages ago.

It is a bug.

This topic is rather old, and I was one of the people to dive into it last 
time around. Chuq was the last one to fix it AFAIK.

The last resolution of this, which was like 5 years ago, was that 
everything is LABELED in DEV_BSIZE blocks, but i/o happens in real blocks. 
If your file system uses UBC, block size has to be a power-of-two size of 
blocks. Well, either your block size is an integer multiple of 4k, or 4k 
is an integer multiple of your block size. So that works out to 
power-of-two size.

So yes, if it doesn't work, it's a bug.

Take care,


Attachment: pgpdsj3R4v34f.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index