]> git.baikalelectronics.ru Git - kernel.git/commit
bio: add a helper calculating nr segments to alloc
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 9 Jan 2021 16:03:02 +0000 (16:03 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 15:58:24 +0000 (08:58 -0700)
commit942077aba60df0d78c0309f010af0fdb9a2a9d50
treee650e34e08f97cadb1d47e9650ff045006bac9be
parenta6cd5a2d400cc4801733a0f3f7471fb5d3a5b610
bio: add a helper calculating nr segments to alloc

Add a helper function calculating the number of bvec segments we need to
allocate to construct a bio. It doesn't change anything functionally,
but will be used to not duplicate special cases in the future.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/block_dev.c
fs/iomap/direct-io.c
include/linux/bio.h