]> git.baikalelectronics.ru Git - kernel.git/commit
block: Add bio_max_segs
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 29 Jan 2021 04:38:57 +0000 (04:38 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 26 Feb 2021 22:49:51 +0000 (15:49 -0700)
commit021018440a760aa2e09131e3b9d3da7766dc29ea
treef6fb9ac2dafb2ca03002f6c86bc0fb1062fadcfa
parent8b0d3b0412b484ac35dafb52e6e49add1200c7e0
block: Add bio_max_segs

It's often inconvenient to use BIO_MAX_PAGES due to min() requiring the
sign to be the same.  Introduce bio_max_segs() and change BIO_MAX_PAGES to
be unsigned to make it easier for the users.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
20 files changed:
block/blk-map.c
drivers/block/xen-blkback/blkback.c
drivers/md/dm-io.c
drivers/md/dm-log-writes.c
drivers/nvme/target/io-cmd-bdev.c
drivers/nvme/target/passthru.c
drivers/target/target_core_iblock.c
drivers/target/target_core_pscsi.c
fs/block_dev.c
fs/direct-io.c
fs/erofs/data.c
fs/ext4/readpage.c
fs/f2fs/data.c
fs/f2fs/node.c
fs/iomap/buffered-io.c
fs/mpage.c
fs/nfs/blocklayout/blocklayout.c
fs/xfs/xfs_bio_io.c
fs/xfs/xfs_buf.c
include/linux/bio.h