[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/28] vhost-user: Fix backends without multiqueue support
From: |
Kevin Wolf |
Subject: |
[PULL 18/28] vhost-user: Fix backends without multiqueue support |
Date: |
Fri, 9 Jul 2021 14:50:25 +0200 |
dev->max_queues was never initialised for backends that don't support
VHOST_USER_PROTOCOL_F_MQ, so it would use 0 as the maximum number of
queues to check against and consequently fail for any such backend.
Set it to 1 if the backend doesn't have multiqueue support.
Fixes: c90bd505a3e8210c23d69fecab9ee6f56ec4a161
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210705171429.29286-1-kwolf@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/virtio/vhost-user.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 1ac4a2ebec..29ea2b4fce 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -1913,7 +1913,10 @@ static int vhost_user_backend_init(struct vhost_dev
*dev, void *opaque,
if (err < 0) {
return -EPROTO;
}
+ } else {
+ dev->max_queues = 1;
}
+
if (dev->num_queues && dev->max_queues < dev->num_queues) {
error_setg(errp, "The maximum number of queues supported by the "
"backend is %" PRIu64, dev->max_queues);
--
2.31.1
- [PULL 10/28] export/fuse: Pass default_permissions for mount, (continued)
- [PULL 10/28] export/fuse: Pass default_permissions for mount, Kevin Wolf, 2021/07/09
- [PULL 11/28] export/fuse: Add allow-other option, Kevin Wolf, 2021/07/09
- [PULL 12/28] export/fuse: Give SET_ATTR_SIZE its own branch, Kevin Wolf, 2021/07/09
- [PULL 13/28] export/fuse: Let permissions be adjustable, Kevin Wolf, 2021/07/09
- [PULL 14/28] iotests/308: Test +w on read-only FUSE exports, Kevin Wolf, 2021/07/09
- [PULL 15/28] iotests/fuse-allow-other: Test allow-other, Kevin Wolf, 2021/07/09
- [PULL 17/28] MAINTAINERS: add block/rbd.c reviewer, Kevin Wolf, 2021/07/09
- [PULL 16/28] block/rbd: fix type of task->complete, Kevin Wolf, 2021/07/09
- [PULL 19/28] blockdev: fix drive-backup transaction endless drained section, Kevin Wolf, 2021/07/09
- [PULL 20/28] qcow2: Prohibit backing file changes in 'qemu-img amend', Kevin Wolf, 2021/07/09
- [PULL 18/28] vhost-user: Fix backends without multiqueue support,
Kevin Wolf <=
- [PULL 21/28] qemu-img: Require -F with -b backing image, Kevin Wolf, 2021/07/09
- [PULL 22/28] qemu-img: Improve error for rebase without backing format, Kevin Wolf, 2021/07/09
- [PULL 23/28] qcow2: Fix dangling pointer after reopen for 'file', Kevin Wolf, 2021/07/09
- [PULL 24/28] block: Add bdrv_reopen_queue_free(), Kevin Wolf, 2021/07/09
- [PULL 25/28] block: Acquire AioContexts during bdrv_reopen_multiple(), Kevin Wolf, 2021/07/09
- [PULL 26/28] block: Support multiple reopening with x-blockdev-reopen, Kevin Wolf, 2021/07/09
- [PULL 27/28] iotests: Test reopening multiple devices at the same time, Kevin Wolf, 2021/07/09
- [PULL 28/28] block: Make blockdev-reopen stable API, Kevin Wolf, 2021/07/09
- Re: [PULL 00/28] Block layer patches, Peter Maydell, 2021/07/10