summary refs log tree commit diff stats
path: root/linux-user/arm/cpu_loop.c
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2023-07-27 18:10:18 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2023-07-27 15:51:46 -0400
commit809c319f8a089fbc49223dc29e1cc2b978beeada (patch)
tree17544751ba84df1eefa1ca63bffe7b64176a5fe3 /linux-user/arm/cpu_loop.c
parent69785d66ae1ec43f77fc65109a21721992bead9f (diff)
downloadfocaccia-qemu-809c319f8a089fbc49223dc29e1cc2b978beeada.tar.gz
focaccia-qemu-809c319f8a089fbc49223dc29e1cc2b978beeada.zip
block/blkio: retry blkio_connect() if it fails using `fd`
libblkio 1.3.0 added support of "fd" property for virtio-blk-vhost-vdpa
driver. In QEMU, starting from commit cad2ccc395 ("block/blkio: use
qemu_open() to support fd passing for virtio-blk") we are using
`blkio_get_int(..., "fd")` to check if the "fd" property is supported
for all the virtio-blk-* driver.

Unfortunately that property is also available for those driver that do
not support it, such as virtio-blk-vhost-user.

So, `blkio_get_int()` is not enough to check whether the driver supports
the `fd` property or not. This is because the virito-blk common libblkio
driver only checks whether or not `fd` is set during `blkio_connect()`
and fails with -EINVAL for those transports that do not support it
(all except vhost-vdpa for now).

So let's handle the `blkio_connect()` failure, retrying it using `path`
directly.

Fixes: cad2ccc395 ("block/blkio: use qemu_open() to support fd passing for virtio-blk")
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20230727161020.84213-3-sgarzare@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'linux-user/arm/cpu_loop.c')
0 files changed, 0 insertions, 0 deletions