[Devel] [PATCH VZ9 1/3] vhost-blk: don't allocate biovec for flush
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Wed Nov 6 12:20:29 MSK 2024
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://virtuozzo.atlassian.net/browse/VSTOR-94596
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Feature: vhost-blk: in-kernel accelerator for virtio-blk guests
---
drivers/vhost/blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/blk.c b/drivers/vhost/blk.c
index 9ef51335449f8..cd8d71c28bbd3 100644
--- a/drivers/vhost/blk.c
+++ b/drivers/vhost/blk.c
@@ -205,7 +205,7 @@ static int vhost_blk_bio_make_simple(struct vhost_blk_req *req,
req->pl = NULL;
req->bio = req->inline_bio;
- bio = bio_alloc(bdev, 1, req->bi_opf, GFP_KERNEL);
+ bio = bio_alloc(bdev, 0, req->bi_opf, GFP_KERNEL);
if (!bio)
return -ENOMEM;
--
2.46.2
More information about the Devel
mailing list