There is no point in adding even one vector as we don't add any pages
to it. E.g. dispatch_rw_block_io(), blkdev_issue_flush() or
async_pmem_flush() where zero vectors are used for flush requests.
Fixes: 17bfe6e0400da ("drivers/vhost: vhost-blk accelerator for virtio-blk
guests")
https://virtuozz
https://virtuozzo.atlassian.net/browse/VSTOR-94596
Pavel Tikhomirov (3):
vhost-blk: don't allocate biovec for flush
vhost-blk: fix bio allocation failure on excess bio vector count
vhost-blk: fix allocation size for bio pointers
drivers/vhost/blk.c | 7 ---
1 file changed, 4 insertions
Please take a look.
On 11/6/24 17:20, Pavel Tikhomirov wrote:
https://virtuozzo.atlassian.net/browse/VSTOR-94596
Pavel Tikhomirov (3):
vhost-blk: don't allocate biovec for flush
vhost-blk: fix bio allocation failure on excess bio vector count
vhost-blk: fix allocation size for bio poin
Even pages with continious virtual addresses may not be merged in one
bio vector in bio_add_page -> bvec_try_merge_page. So it looks like the
best estimate on the number of required bios we can make is a total
number of pages in the request divided by BIO_MAX_VECS (worst case is
when each of BIO_MA
The bio_alloc() function does not allow to allocate bio-s with more than
BIO_MAX_VECS bio vectors. Currently we give to it the nr_vecs argument
equal to the number of pages in all iovecs of the processed request,
which can be much bigger than BIO_MAX_VECS (256), this is incorrect and
leads to the b