@@ -603,6 +603,12 @@ static void blkio_unregister_buf(BlockDriverState *bs, void *host, size_t size)
}
}
+static void blkio_io_uring_parse_filename(const char *filename, QDict *options,
+ Error **errp)
+{
+ bdrv_parse_filename_strip_prefix(filename, "io_uring:", options);
+}
+
static int blkio_io_uring_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
@@ -1049,6 +1055,7 @@ static BlockDriver bdrv_io_uring = {
.format_name = "io_uring",
.protocol_name = "io_uring",
.bdrv_needs_filename = true,
+ .bdrv_parse_filename = blkio_io_uring_parse_filename,
BLKIO_DRIVER_COMMON
};
The qemu-iotests test suite requires filename parsing because it does not use image options syntax everywhere. Add it now so that later patches can enable qemu-iotests for the io_uring block driver. The blkio.c code has other libblkio-based drivers that could benefit from filename parsing too. Leave them for now because I am not yet ready to add qemu-iotests support for them. Suggested-by: Hanna Czenczek <hreitz@redhat.com> Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> --- block/blkio.c | 7 +++++++ 1 file changed, 7 insertions(+)