]> xenbits.xensource.com Git - libvirt.git/commit
qemuDomainRemoveMemoryDevice: unlink() memory backing file
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Jan 2018 12:02:52 +0000 (13:02 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 2 Feb 2018 10:03:15 +0000 (11:03 +0100)
commit4d83a6722f5b9c10ee85d5a5ffee364ac0e7b8af
tree3bc09446ade465dc60dce16c52411c6f6efd6964
parent93db7eea1b86408e02852a8c886d473f4f5007e3
qemuDomainRemoveMemoryDevice: unlink() memory backing file

https://bugzilla.redhat.com/show_bug.cgi?id=1461214

Since fec8f9c49af we try to use predictable file names for
'memory-backend-file' objects. But that made us provide full path
to qemu when hot plugging the object while previously we provided
merely a directory. But this makes qemu behave differently. If
qemu sees a path terminated with a directory it calls mkstemp()
and unlinks the file immediately. But if it sees full path it
just calls open(path, O_CREAT ..); and never unlinks the file.
Therefore it's up to libvirt to unlink the file and not leave it
behind.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_hotplug.c
src/qemu/qemu_process.c
src/qemu/qemu_process.h