]> git.baikalelectronics.ru Git - kernel.git/commit
block: set .bi_max_vecs as actual allocated vector number
authorMing Lei <ming.lei@redhat.com>
Mon, 11 Jan 2021 03:05:55 +0000 (11:05 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 04:22:45 +0000 (21:22 -0700)
commitdc7cd8e6ecf0f44b2e643de220bcf803ff95d200
treed079f69cab689d9fdb48484d8afca20ae7fb88b3
parentd0d9c7e547306caa5aa9687153aaf47b7ac2d3f6
block: set .bi_max_vecs as actual allocated vector number

bvec_alloc() may allocate more bio vectors than requested, so set
.bi_max_vecs as actual allocated vector number, instead of the requested
number. This way can help fs build bigger bio because new bio often won't
be allocated until the current one becomes full.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c