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

2023-07-25 Thread Stefano Garzarella
On Tue, Jul 25, 2023 at 12:15:40PM +0100, Daniel P. Berrangé wrote: On Tue, Jul 25, 2023 at 01:11:55PM +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

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

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 01:11:55PM +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] block/blkio: do not use open flags in qemu_open()

2023-07-25 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