From: Peter Krempa <[email protected]> Use 'qemuDomainObjEnterOperation' to unlock the domain object while accessing storage. In case when storage blocks this allows other jobs to fetch the domain object and get queued up.
Signed-off-by: Peter Krempa <[email protected]> --- src/qemu/qemu_domain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ea591e4c95..d17f0dc0d6 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11725,6 +11725,9 @@ qemuDomainStorageSourceProbeSize(virQEMUDriverConfig *cfg, if (virStorageSourceIsEmpty(src)) return 0; + if (qemuDomainObjEnterOperation(vm, VIR_ASYNC_JOB_NONE) < 0) + return -1; + if (qemuDomainStorageOpenStat(cfg, vm, src, &fd, &sb, true) <= 0) return -1; @@ -11741,6 +11744,8 @@ qemuDomainStorageSourceProbeSize(virQEMUDriverConfig *cfg, qemuDomainStorageCloseStat(src, &fd); + qemuDomainObjExitOperation(vm); + if (rc < 0 || buflen < 0) return -1; -- 2.54.0
