]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: vhost-user-fs: format alias on the command line
authorJán Tomko <jtomko@redhat.com>
Tue, 5 Oct 2021 11:18:52 +0000 (13:18 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 6 Oct 2021 10:03:11 +0000 (12:03 +0200)
The commit adding the vhost-user-fs device forgot to format
the device's alias on the command line.

Thankfully it was not needed yet because virtiofs migration
is not yet supported, but it will be needed in the future
to allow hot(un)plug.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args
tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args

index 08f6d735f88e6d81a2a72b18174c5245dffc8dba..90c8022b0717481bdce2296dc4daa601e8222424 100644 (file)
@@ -2057,6 +2057,7 @@ qemuBuildVHostUserFsCommandLine(virCommand *cmd,
                               VIR_DOMAIN_DEVICE_FS, fs) < 0)
         return -1;
 
+    virBufferAsprintf(&opt, ",id=%s", fs->info.alias);
     virBufferAsprintf(&opt, ",chardev=%s", chardev_alias);
     if (fs->queue_size)
         virBufferAsprintf(&opt, ",queue-size=%llu", fs->queue_size);
index 6311f8f65e120ab5473520a5d55ed22116e59210..7586a8edbf4e28202f6a9eeb8c5bcf50b6d44b94 100644 (file)
@@ -28,7 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -no-acpi \
 -boot strict=on \
 -chardev socket,id=chr-vu-fs0,path=/tmp/lib/domain--1-guest/fs0.vhost-fs.sock \
--device vhost-user-fs-pci,chardev=chr-vu-fs0,queue-size=1024,tag=mount_tag,bus=pci.0,addr=0x2 \
+-device vhost-user-fs-pci,id=fs0,chardev=chr-vu-fs0,queue-size=1024,tag=mount_tag,bus=pci.0,addr=0x2 \
 -audiodev id=audio1,driver=none \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index 58570592eb51404c27f3cda1b91f8da79a8c6bfa..290d0b9e2fd397ffed2dbc0157635894c6cb1a84 100644 (file)
@@ -34,7 +34,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
 -device virtio-blk-pci,bus=pci.4,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \
 -chardev socket,id=chr-vu-fs0,path=/tmp/lib/domain--1-guest/fs0.vhost-fs.sock \
--device vhost-user-fs-pci,chardev=chr-vu-fs0,tag=mount_tag,bootindex=2,bus=pci.1,addr=0x0 \
+-device vhost-user-fs-pci,id=fs0,chardev=chr-vu-fs0,tag=mount_tag,bootindex=2,bus=pci.1,addr=0x0 \
 -audiodev id=audio1,driver=none \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on