提交 516b8676 编写于 作者: M Michal Privoznik

qemuProcessStop: Remove image metadata only when allowed

In v5.9.0-370-g8fa0374c I've tried to fix a bug by removing
some stale XATTRs in qemuProcessStop(). However, I forgot to
do nothing when the VIR_QEMU_PROCESS_STOP_NO_RELABEL flag was
specified.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
上级 6865dc29
...@@ -7648,6 +7648,7 @@ void qemuProcessStop(virQEMUDriverPtr driver, ...@@ -7648,6 +7648,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
/* Do this explicitly after vm->pid is reset so that security drivers don't /* Do this explicitly after vm->pid is reset so that security drivers don't
* try to enter the domain's namespace which is non-existent by now as qemu * try to enter the domain's namespace which is non-existent by now as qemu
* is no longer running. */ * is no longer running. */
if (!(flags & VIR_QEMU_PROCESS_STOP_NO_RELABEL)) {
for (i = 0; i < def->ndisks; i++) { for (i = 0; i < def->ndisks; i++) {
virDomainDiskDefPtr disk = def->disks[i]; virDomainDiskDefPtr disk = def->disks[i];
...@@ -7656,6 +7657,7 @@ void qemuProcessStop(virQEMUDriverPtr driver, ...@@ -7656,6 +7657,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->src); qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->src);
} }
}
/* clear all private data entries which are no longer needed */ /* clear all private data entries which are no longer needed */
qemuDomainObjPrivateDataClear(priv); qemuDomainObjPrivateDataClear(priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册