diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2015-05-19 14:31:01 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-13 12:32:04 -0600 |
commit | b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c (patch) | |
tree | 8a6d90b3e092e598fefd34718afd2198d8bff2a7 /drivers/md/dm-io.c | |
parent | 6cf66b4caf9c71f64a5486cadbd71ab58d0d4307 (diff) | |
download | linux-b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c.tar.bz2 |
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 <swhiteho@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
[hch: rebased and wrote a changelog]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lin <ming.l@ssi.samsung.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md/dm-io.c')
-rw-r--r-- | drivers/md/dm-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index c84714f70378..6f8e83b2a6f8 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -316,7 +316,7 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where, if ((rw & REQ_DISCARD) || (rw & REQ_WRITE_SAME)) num_bvecs = 1; else - num_bvecs = min_t(int, bio_get_nr_vecs(where->bdev), + num_bvecs = min_t(int, BIO_MAX_PAGES, dm_sector_div_up(remaining, (PAGE_SIZE >> SECTOR_SHIFT))); bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios); |