iomap: relax memory alignment restriction for O_DIRECT dio-mem-align
authorJens Axboe <axboe@kernel.dk>
Thu, 11 Feb 2021 15:35:43 +0000 (08:35 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 15 Feb 2021 15:39:28 +0000 (08:39 -0700)
commit7c7f5e7431e4131c9cb3462bbd03d9db330bee45
tree0fca46676914f00a9900a7af6aa763ef00b30396
parent056ad0bb3710562ad38ce831d4d412fd6b8d954f
iomap: relax memory alignment restriction for O_DIRECT

We currently require blocksize alignment for both position/length and the
memory range. The latter is overly restrictive, as most devices can do DMA
at a much finer granularity.

Honor the bdev setting for DMA alignment, and use that for checking if we
can process the IO or need to error it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/iomap/direct-io.c