static int blkio_nvme_io_uring(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
- const char *filename = qdict_get_str(options, "filename");
+ const char *path = qdict_get_try_str(options, "path");
BDRVBlkioState *s = bs->opaque;
int ret;
- ret = blkio_set_str(s->blkio, "path", filename);
- qdict_del(options, "filename");
+ if (!path) {
+ error_setg(errp, "missing 'path' option");
+ return -EINVAL;
+ }
+
+ ret = blkio_set_str(s->blkio, "path", path);
+ qdict_del(options, "path");
if (ret < 0) {
error_setg_errno(errp, -ret, "failed to set path: %s",
blkio_get_error_msg());
static BlockDriver bdrv_nvme_io_uring = BLKIO_DRIVER(
DRIVER_NVME_IO_URING,
- .bdrv_needs_filename = true,
);
static BlockDriver bdrv_virtio_blk_vfio_pci = BLKIO_DRIVER(
#
# Driver specific block device options for the nvme-io_uring backend.
#
-# @filename: path to the image file
+# @path: path to the image file
#
# Since: 7.2
##
{ 'struct': 'BlockdevOptionsNvmeIoUring',
- 'data': { 'filename': 'str' },
+ 'data': { 'path': 'str' },
'if': 'CONFIG_BLKIO' }
##