UFS: unaligned read from GELI with 8k sectorsize

Anton Yuzhaninov citrin at citrin.ru
Sat Oct 1 19:52:05 UTC 2016


On 2016-10-01 07:45, Konstantin Belousov wrote:
> On Sat, Oct 01, 2016 at 12:42:09AM -0400, Anton Yuzhaninov wrote:
> FreeBSD vnode pager assumes that it can read at page granularity.
> Since x86 page size is 4k, sometimes page-in has to occur not on the
> fragment boundary.  In other words, fragment size > 4k are effectively
> not supported.

You mean that geom sector size > 4k is not supported?

UFS with 8k fragment should work (over geom provider with sector size <= 
4k).

> Boot needs to execute files from the root mount, which results in the
> mmap(2) attempts on your file system.  While mount and reads/writes do
> not involve the pager, which does not trigger further bugs in the
> buffer cache code.  It should break if you try to execute badly aligned
> ELF binary from your stick, or just mmap() a file from the stick with
> non-8k aligned offset.

Thank you for detailed answer!


More information about the freebsd-fs mailing list