Current-Users archive

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

Re: Support for 4KB sectors size disk ?



> FFS knows about the hardware blocksize so it can make sure directory
> entries don't span block boundaries. (This prevents getting partial
> updates after a crash, assuming hardware block writes are atomic.) I
> don't know enough about FFS internals to be sure at this point whether
> this size should stay 512 or not. One would like FS images to continue
> to work if dd'd to a disk with smaller blocks.

For atomic directory ops, DIRBLKSIZ is used and currently
it's DEV_BSIZE constant, as noted in PR kern/42573.

On the other hand, "disk block size (or min I/O size)" for ffs
is denoted in struct fs with fs_fsbtodb and fs_fsize.

I'm not sure if these two values can be different, but if they
are not same, there is no generic way to determine DIRBLKSIZ
for atomic ops unless we add a new member in struct fs, I'm afraid.
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index