Whamcloud - gitweb
libext2fs: force DIO alignment FreeBSD when operating on a block device
authorTheodore Ts'o <tytso@mit.edu>
Tue, 13 Sep 2016 22:39:22 +0000 (18:39 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 13 Sep 2016 22:39:22 +0000 (18:39 -0400)
commit3a68c6f1f071c2826e8ec6ceb810c98719a98717
tree55de6593b177ee0b3607434875c87d201f8e6456
parent370a24cd33940068a890235bea2151b5f0440f56
libext2fs: force DIO alignment FreeBSD when operating on a block device

FreeBSD (and possibly BSD systems) requires that reads and writes to
block devices must be aligned, even when the O_DIRECT flag is not
specified.  Previously this was hard-coded to 512 bytes, but in order
to properly handle Advanced Format HDD's, query the BSD kernel to
determine the proper alignment to use.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/unix_io.c