block/blkio: use blkio_set_int("fd") to check fd support
authorStefano Garzarella <sgarzare@redhat.com>
Thu, 27 Jul 2023 16:10:20 +0000 (18:10 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 27 Jul 2023 19:51:46 +0000 (15:51 -0400)
commit1c38fe69e2b8a05c1762b122292fa7e3662f06fd
treebe1acffa15d0b8b44018eb0554856ca3d6f6edbc
parent723bea27b127969931fa26bc0de79372a3d9e148
block/blkio: use blkio_set_int("fd") to check fd support

Setting the `fd` property fails with virtio-blk-* libblkio drivers
that do not support fd passing since
https://gitlab.com/libblkio/libblkio/-/merge_requests/208.

Getting the `fd` property, on the other hand, always succeeds for
virtio-blk-* libblkio drivers even when they don't support fd passing.

This patch switches to setting the `fd` property because it is a
better mechanism for probing fd passing support than getting the `fd`
property.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20230727161020.84213-5-sgarzare@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/blkio.c