qemu: Drop priv->job.dump_memory_only bool

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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2018-04-04 12:24:29 +02:00
parent a5bc7130f3
commit ceb4ff664b
3 changed files with 1 additions and 5 deletions

View File

@ -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;

View File

@ -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 */

View File

@ -3772,8 +3772,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
@ -13464,7 +13462,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;