block: remove bio_get_nr_vecs()

We can always fill up the bio now, no need to estimate the possible
size based on queue parameters.

Acked-by: Steven Whitehouse <[email protected]>
Signed-off-by: Kent Overstreet <[email protected]>
[hch: rebased and wrote a changelog]
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Ming Lin <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Kent Overstreet 2015-05-19 14:31:01 +02:00 • committed by Jens Axboe
commit b54ffb73ca
16 changed files with 18 additions and 74 deletions

View file

@ -655,7 +655,7 @@ static inline int dio_new_bio(struct dio *dio, struct dio_submit *sdio,
if (ret)
goto out;
sector = start_sector << (sdio->blkbits - 9);
nr_pages = min(sdio->pages_in_io, bio_get_nr_vecs(map_bh->b_bdev));
nr_pages = min(sdio->pages_in_io, BIO_MAX_PAGES);
BUG_ON(nr_pages <= 0);
dio_bio_alloc(dio, sdio, map_bh->b_bdev, sector, nr_pages);
sdio->boundary = 0;