commit 7a800a20ae6329e803c5c646b20811a6ae9ca136 Author: Christoph Hellwig Date: Tue Feb 2 18:19:29 2021 +0100 block: use bi_max_vecs to find the bvec pool Instead of encoding of the bvec pool using magic bio flags, just use a helper to find the pool based on the max_vecs value. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 72b043654ba8b8ce2e0cf3da49247b2db3acb2c1 Author: Christoph Hellwig Date: Tue Feb 2 18:19:28 2021 +0100 md/raid10: remove dead code in reshape_request A bio allocated by bio_alloc_bioset comes pre-zeroed, no need to clear random fields. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Signed-off-by: Jens Axboe commit 977be01273844626ddeef4a464b42b99418d76e6 Author: Christoph Hellwig Date: Tue Feb 2 18:19:27 2021 +0100 block: mark the bio as cloned in bio_iov_bvec_set bio_iov_bvec_set clones the bio_vecs from the iter, and thus should be treated like a cloned bio in every respect. That also includes not touching bi_max_vecs as that is a property of the bio allocation and not its current payload. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ed97ce5e1daf26d456760443fc89dc14d2b677e5 Author: Christoph Hellwig Date: Tue Feb 2 18:19:26 2021 +0100 block: set BIO_NO_PAGE_REF in bio_iov_bvec_set bio_iov_bvec_set assigns the foreign bvec, so setting the NO_PAGE_REF directly there seems like the best fit. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 86004515ed80c01d59ab54b5d048164750af3c4b Author: Christoph Hellwig Date: Tue Feb 2 18:19:25 2021 +0100 block: remove a layer of indentation in bio_iov_iter_get_pages Remove a pointless layer of indentation after a return statement. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0f2e6ab851ae146c468bc5151c302c6e2473f70a Author: Christoph Hellwig Date: Tue Feb 2 18:19:24 2021 +0100 block: turn the nr_iovecs argument to bio_alloc* into an unsigned short The bi_max_vecs and bi_vcnt fields are defined as unsigned short, so don't allow passing larger values in. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit de76fd893074ab2cea132c28ac9efd9d0434215e Author: Christoph Hellwig Date: Tue Feb 2 18:19:23 2021 +0100 block: remove the 1 and 4 vec bvec_slabs entries All bios with up to 4 bvecs use the inline bvecs in the bio itself, so don't bother to define bvec_slabs entries for them. Also decruftify the bvec_slabs definition and initialization while we're at it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f007a3d66c5480c8dae3fa20a89a06861ef1f5db Author: Christoph Hellwig Date: Tue Feb 2 18:19:22 2021 +0100 block: streamline bvec_alloc Avoid the pointless goto by trying the slab allocation first and falling through to the mempool. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe