summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2015-05-19 14:31:01 +0200
committerJens Axboe <axboe@fb.com>2015-08-13 12:32:04 -0600
commitb54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c (patch)
tree8a6d90b3e092e598fefd34718afd2198d8bff2a7 /block
parent6cf66b4caf9c71f64a5486cadbd71ab58d0d4307 (diff)
downloadlinux-b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c.tar.gz
linux-b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c.tar.bz2
linux-b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c.zip
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 'block')
-rw-r--r--block/bio.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/block/bio.c b/block/bio.c
index ba9c4b0c0ff2..425d6d4a2f7a 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -694,29 +694,6 @@ integrity_clone:
EXPORT_SYMBOL(bio_clone_bioset);
/**
- * bio_get_nr_vecs - return approx number of vecs
- * @bdev: I/O target
- *
- * Return the approximate number of pages we can send to this target.
- * There's no guarantee that you will be able to fit this number of pages
- * into a bio, it does not account for dynamic restrictions that vary
- * on offset.
- */
-int bio_get_nr_vecs(struct block_device *bdev)
-{
- struct request_queue *q = bdev_get_queue(bdev);
- int nr_pages;
-
- nr_pages = min_t(unsigned,
- queue_max_segments(q),
- queue_max_sectors(q) / (PAGE_SIZE >> 9) + 1);
-
- return min_t(unsigned, nr_pages, BIO_MAX_PAGES);
-
-}
-EXPORT_SYMBOL(bio_get_nr_vecs);
-
-/**
* bio_add_pc_page - attempt to add page to bio
* @q: the target queue
* @bio: destination bio