From f1a0d2277c369e46cf37c553ed2207ee312b8033 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 5 Jun 2018 13:53:46 +0200 Subject: [PATCH] qemu: domain: drop qemuDomainSupportsBlockJobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It always returns true. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/qemu/qemu_domain.c | 14 -------------- src/qemu/qemu_domain.h | 2 -- src/qemu/qemu_driver.c | 12 ------------ 3 files changed, 28 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f2cf3f580d..fab237d0ae 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -9855,20 +9855,6 @@ qemuDomainGetMonitor(virDomainObjPtr vm) } -/** - * qemuDomainSupportsBlockJobs: - * @vm: domain object - * - * Returns -1 in case when qemu does not support block jobs at all. Otherwise - * returns 0. - */ -int -qemuDomainSupportsBlockJobs(virDomainObjPtr vm ATTRIBUTE_UNUSED) -{ - return 0; -} - - /** * qemuFindAgentConfig: * @def: domain definition diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 00b497e6a6..742632f6de 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -821,8 +821,6 @@ int qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); -int qemuDomainSupportsBlockJobs(virDomainObjPtr vm) - ATTRIBUTE_NONNULL(1); bool qemuDomainDiskBlockJobIsActive(virDomainDiskDefPtr disk); bool qemuDomainHasBlockjob(virDomainObjPtr vm, bool copy_only) ATTRIBUTE_NONNULL(1); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e1e04beacb..536d7b5760 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17194,9 +17194,6 @@ qemuDomainBlockPullCommon(virQEMUDriverPtr driver, if (virDomainObjCheckActive(vm) < 0) goto endjob; - if (qemuDomainSupportsBlockJobs(vm) < 0) - goto endjob; - if (!(disk = qemuDomainDiskByName(vm->def, path))) goto endjob; @@ -17310,9 +17307,6 @@ qemuDomainBlockJobAbort(virDomainPtr dom, if (virDomainObjCheckActive(vm) < 0) goto endjob; - if (qemuDomainSupportsBlockJobs(vm) < 0) - goto endjob; - if (!(disk = qemuDomainDiskByName(vm->def, path))) goto endjob; @@ -17461,9 +17455,6 @@ qemuDomainGetBlockJobInfo(virDomainPtr dom, if (virDomainObjCheckActive(vm) < 0) goto endjob; - if (qemuDomainSupportsBlockJobs(vm) < 0) - goto endjob; - if (!(disk = virDomainDiskByName(vm->def, path, true))) { virReportError(VIR_ERR_INVALID_ARG, _("disk %s not found in the domain"), path); @@ -17545,9 +17536,6 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom, if (virDomainObjCheckActive(vm) < 0) goto endjob; - if (qemuDomainSupportsBlockJobs(vm) < 0) - goto endjob; - if (!(disk = qemuDomainDiskByName(vm->def, path))) goto endjob;