]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Generate shorter channel target paths
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Apr 2023 15:34:12 +0000 (17:34 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 17 Aug 2023 15:19:01 +0000 (17:19 +0200)
commitd3759d3674ab9453e5fb5a27ab6c28b8ff8d5569
treebd5ae7dc85aed299becc78bf7f0d6096cf69bb46
parent5d8e842a0fe093e707e8e8e56d70923a0e8a58fe
qemu: Generate shorter channel target paths

A <channel/> device is basically an UNIX socket into guest.
Whatever is sent from the host, appears in the guest and vice
versa. But because of that, the length of the path to the socket
is important (underscored by fact that we derive the path from
domain short name). But there are still cases where we might not
fit into UNIX_PATH_MAX limit (usually 108 characters), because
the path is derived also from other variables, e.g.
XDG_CONFIG_HOME for session domains.

There are two components though, that are needless: "/target/"
and "domain-" prefix. Drop them. This is safe to do, because
running domains have their path saved in status XML and even
though paths are dropped on migration, they are not part of guest
ABI and thus we are free to change them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
12 files changed:
libvirt.spec.in
src/qemu/qemu_conf.c
src/qemu/qemu_domain.c
tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent-detach.xml
tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent-detach.xml
tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent-detach.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent.xml
tests/qemuxml2argvdata/channel-unix-source-path.xml
tests/qemuxml2xmloutdata/channel-unix-source-path-active.xml
tests/qemuxml2xmloutdata/channel-unix-source-path-inactive.xml
tests/testutilsqemu.c