Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1668538
| From | NeilBrown <neilb@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 13/13] block: don't check for BIO_MAX_PAGES in blk_bio_segment_split() |
| Date | 2017-06-18 06:50 +0200 |
| Message-ID | <tTAjT-sG-11@gated-at.bofh.it> (permalink) |
| References | <tTAad-oX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
blk_bio_segment_split() makes sure bios have no more than
BIO_MAX_PAGES entries in the bi_io_vec.
This was done because bio_clone_bioset() (when given a
mempool bioset) could not handle larger io_vecs.
No driver uses bio_clone_bioset() any more, they all
use bio_clone_fast() if anything, and bio_clone_fast()
doesn't clone the bi_io_vec.
The main user of of bio_clone_bioset() at this level
is bounce.c, and bouncing now happens before blk_bio_segment_split(),
so that is not of concern.
So remove the big helpful comment and the code.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: NeilBrown <neilb@suse.com>
---
block/blk-merge.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index e7862e9dcc39..cea544ec5d96 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -108,25 +108,9 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
bool do_split = true;
struct bio *new = NULL;
const unsigned max_sectors = get_max_io_size(q, bio);
- unsigned bvecs = 0;
bio_for_each_segment(bv, bio, iter) {
/*
- * With arbitrary bio size, the incoming bio may be very
- * big. We have to split the bio into small bios so that
- * each holds at most BIO_MAX_PAGES bvecs because
- * bio_clone_bioset() can fail to allocate big bvecs.
- *
- * Those drivers which will need to use bio_clone_bioset()
- * should tell us in some way. For now, impose the
- * BIO_MAX_PAGES limit on all queues.
- *
- * TODO: handle users of bio_clone_bioset() differently.
- */
- if (bvecs++ >= BIO_MAX_PAGES)
- goto split;
-
- /*
* If the queue doesn't support SG gaps and adding this
* offset would create a gap, disallow it.
*/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/13] block: assorted cleanup for bio splitting and cloning. NeilBrown <neilb@suse.com> - 2017-06-18 06:40 +0200
[PATCH 06/13] rbd: use bio_clone_fast() instead of bio_clone() NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 10/13] xen-blkfront: remove bio splitting. NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 12/13] block: remove bio_clone() and all references. NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 11/13] bcache: use kmalloc to allocate bio in bch_data_verify() NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 09/13] lightnvm/pblk-read: use bio_clone_fast() NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 13/13] block: don't check for BIO_MAX_PAGES in blk_bio_segment_split() NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 04/13] blk: use non-rescuing bioset for q->bio_split. NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 07/13] drbd: use bio_clone_fast() instead of bio_clone() NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 03/13] blk: make the bioset rescue_workqueue optional. NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 05/13] block: Improvements to bounce-buffer handling NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
[PATCH 08/13] pktcdvd: use bio_clone_fast() instead of bio_clone() NeilBrown <neilb@suse.com> - 2017-06-18 06:50 +0200
Re: [PATCH 00/13] block: assorted cleanup for bio splitting and cloning. Jens Axboe <axboe@kernel.dk> - 2017-06-18 20:50 +0200
Re: [PATCH 00/13] block: assorted cleanup for bio splitting and cloning. NeilBrown <neilb@suse.com> - 2017-06-18 23:40 +0200
csiph-web