提交 b247d47f 编写于 作者: J Jiri Denemark

qemu: Don't mess with disk->mirrorState

This patch reverts commit 76c61cdc.

VIR_DOMAIN_DISK_MIRROR_STATE_ABORT says we asked for a block job to be
aborted rather than saying it was aborted. Let's just use
VIR_DOMAIN_DISK_MIRROR_STATE_NONE consistently whenever a block job
finishes since no caller depends on VIR_DOMAIN_DISK_MIRROR_STATE_ABORT
(anymore) to check whether a block job failed or it was cancelled.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 a9ba39a1
......@@ -174,8 +174,7 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
case VIR_DOMAIN_BLOCK_JOB_CANCELED:
virStorageSourceFree(disk->mirror);
disk->mirror = NULL;
disk->mirrorState = status == VIR_DOMAIN_BLOCK_JOB_FAILED ?
VIR_DOMAIN_DISK_MIRROR_STATE_ABORT : VIR_DOMAIN_DISK_MIRROR_STATE_NONE;
disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_NONE;
disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN;
save = true;
diskPriv->blockjob = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册