tech-kern archive

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

Re: blocksizes



On Mon, Jan 25, 2010 at 02:03:48AM +0900, Izumi Tsutsui wrote:
> > N.B. So far I have MSDOSFS and FFS running on a disk with 1K sectors
> > and I learned that the block size translation is already done
> > in our block drivers, so there is no need to funnel I/O through dk.
> 
> fdisk(8) and newfs(8) don't work on 2KB/sector MO drive here.
> (though newfs_msdos(8) and mount_msdos(8) work)


Right. I haven't looked at fdisk yet (using wedges and a gpt
label where the kernel code was buggy but the gpt tool was correct).

newfs does work but it takes the wrong sector size, specifying
the correct sector size works but has side effects. This needs
to be corrected. Since our block driver use DEV_BSIZE units
to address the disk the filesystem needs to use a shift factor
that translates between fragments and DEV_BSIZE and not the
physical sector size.

> IMO current blkno translations in wd(4) and sd(4) are just
> a hack without consideration to buffercache(9).

IMO the block drivers use DEV_BSIZE units and translate them
correctly for the physical sector sizes. This avoids translating
them in higher layers. I am aware that FFS could do this by itself.

buffercache is pretty agnostic to sector sizes and it is only
used for a small part of the I/O transfers which is one more
argument to keep it out of the equation.


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


Home | Main Index | Thread Index | Old Index