Re: [PATCH v2] block/blkio: do not use open flags in qemu_open()

2023-07-26 Thread Stefan Hajnoczi
On Wed, Jul 26, 2023 at 09:48:07AM +0200, Stefano Garzarella wrote: > qemu_open() in blkio_virtio_blk_common_open() is used to open the > character device (e.g. /dev/vhost-vdpa-0 or /dev/vfio/vfio) or in > the future eventually the unix socket. > > In all these cases we cannot open the path in

Re: [PATCH v2] block/blkio: do not use open flags in qemu_open()

2023-07-26 Thread Daniel P . Berrangé
On Wed, Jul 26, 2023 at 09:48:07AM +0200, Stefano Garzarella wrote: > qemu_open() in blkio_virtio_blk_common_open() is used to open the > character device (e.g. /dev/vhost-vdpa-0 or /dev/vfio/vfio) or in > the future eventually the unix socket. > > In all these cases we cannot open the path in

[PATCH v2] block/blkio: do not use open flags in qemu_open()

2023-07-26 Thread Stefano Garzarella
qemu_open() in blkio_virtio_blk_common_open() is used to open the character device (e.g. /dev/vhost-vdpa-0 or /dev/vfio/vfio) or in the future eventually the unix socket. In all these cases we cannot open the path in read-only mode, when the `read-only` option of blockdev is on, because the