代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 63846560cf12789ff592374dfc6211d83e693e9d Mon Sep 17 00:00:00 2001
From: Michal Privoznik <mprivozn@redhat.com>
Date: Mon, 18 May 2020 15:07:46 +0200
Subject: [PATCH] qemuProcessStop: Use XATTRs to restore seclabels on disks a
domain is mirroring into
In v5.10.0-rc1~42 (which was later fixed in v6.0.0-rc1~487) I am
removing XATTRs for a file that QEMU is mirroring a disk into but
it is killed meanwhile. Well, we can call
qemuSecurityRestoreImageLabel() which will not only remove XATTRs
but also use them to restore the original owner of the file.
This would be done by blockjob code when the job finishes, but in
this case the job won't finish - QEMU is killed meanwhile
cherry-pick from commit: 0230e3838402624756d6cd913b7d92639fafc7d0
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Jin Yan <jinyan12@huawei.com>
---
src/qemu/qemu_process.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 6fbe0c1..9285ace 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7603,8 +7603,10 @@ void qemuProcessStop(virQEMUDriverPtr driver,
for (i = 0; i < def->ndisks; i++) {
virDomainDiskDefPtr disk = def->disks[i];
- if (disk->mirror)
- qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->mirror);
+ if (disk->mirror) {
+ if (qemuSecurityRestoreImageLabel(driver, vm, disk->mirror, false) < 0)
+ VIR_WARN("Unable to restore security label on %s", disk->dst);
+ }
qemuBlockRemoveImageMetadata(driver, vm, disk->dst, disk->src);
}
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。