iov: introduce iov_iter_aligned
authorKeith Busch <kbusch@kernel.org>
Fri, 10 Jun 2022 19:58:27 +0000 (12:58 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Jun 2022 12:29:11 +0000 (06:29 -0600)
commitcfa320f72882f0e944e2237287db84b0f7df877d
tree4f98bfdc889216c8e68f4c1a1ce0b5a489f87654
parent9cfe3ddecdc556ab1d1693b29e8a26ba80953ccc
iov: introduce iov_iter_aligned

The existing iov_iter_alignment() function returns the logical OR of
address and length. For cases where address and length need to be
considered separately, introduce a helper function that a caller can
specificy length and address masks that indicate if the iov is
unaligned.

Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220610195830.3574005-9-kbusch@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/uio.h
lib/iov_iter.c