[PATCH 64/68] qemu: Drop priv->job.dump_memory_only bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We store the flags passed to the API which started QEMU_ASYNC_JOB_DUMP
and we can use them to check whether a memory-only dump is running.
There's no need for a specific bool flag.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_domain.c | 1 -
 src/qemu/qemu_domain.h | 1 -
 src/qemu/qemu_driver.c | 4 +---
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 3f3a49f064..d82c9aad23 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -329,7 +329,6 @@ qemuDomainObjResetAsyncJob(qemuDomainObjPrivatePtr priv)
     job->asyncStarted = 0;
     job->phase = 0;
     job->mask = QEMU_JOB_DEFAULT_MASK;
-    job->dump_memory_only = false;
     job->abortJob = false;
     job->spiceMigration = false;
     job->spiceMigrated = false;
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 2146ff00a9..8d608da121 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -170,7 +170,6 @@ struct _qemuDomainJobObj {
     unsigned long long asyncStarted;    /* When the current async job started */
     int phase;                          /* Job phase (mainly for migrations) */
     unsigned long long mask;            /* Jobs allowed during async job */
-    bool dump_memory_only;              /* use dump-guest-memory to do dump */
     qemuDomainJobInfoPtr current;       /* async job progress data */
     qemuDomainJobInfoPtr completed;     /* statistics data of a recently completed job */
     bool abortJob;                      /* abort of the job requested */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b9927b727b..04eb0b6929 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3794,8 +3794,6 @@ qemuDumpToFd(virQEMUDriverPtr driver,
     if (qemuSecuritySetImageFDLabel(driver->securityManager, vm->def, fd) < 0)
         return -1;
 
-    priv->job.dump_memory_only = true;
-
     if (detach)
         priv->job.current->statsType = QEMU_DOMAIN_JOB_STATS_TYPE_MEMDUMP;
     else
@@ -13486,7 +13484,7 @@ static int qemuDomainAbortJob(virDomainPtr dom)
     }
 
     if (priv->job.asyncJob == QEMU_ASYNC_JOB_DUMP &&
-        priv->job.dump_memory_only) {
+        priv->job.apiFlags & VIR_DUMP_MEMORY_ONLY) {
         virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                        _("cannot abort memory-only dump"));
         goto endjob;
-- 
2.17.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux