mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
qemu: Rename qemuDomainObjRestoreJob as qemuDomainObjPreserveJob
It is used for saving job out of domain object. Just like virErrorPreserveLast is used for errors. Let's make the naming consistent as Restore would suggest different semantics. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
7c1840fa37
commit
d6d1c4980d
@ -214,8 +214,18 @@ qemuDomainObjResetAsyncJob(qemuDomainJobObj *job)
|
||||
job->cb->resetJobPrivate(job->privateData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* qemuDomainObjPreserveJob
|
||||
* @param obj domain with a job that needs to be preserved
|
||||
* @param job structure where to store job details from @obj
|
||||
*
|
||||
* Saves the current job details from @obj to @job and resets the job in @obj.
|
||||
*
|
||||
* Returns 0 on success, -1 on failure.
|
||||
*/
|
||||
int
|
||||
qemuDomainObjRestoreJob(virDomainObj *obj,
|
||||
qemuDomainObjPreserveJob(virDomainObj *obj,
|
||||
qemuDomainJobObj *job)
|
||||
{
|
||||
qemuDomainObjPrivate *priv = obj->privateData;
|
||||
|
@ -158,7 +158,7 @@ void qemuDomainObjSetJobPhase(virDomainObj *obj,
|
||||
int phase);
|
||||
void qemuDomainObjSetAsyncJobMask(virDomainObj *obj,
|
||||
unsigned long long allowedJobs);
|
||||
int qemuDomainObjRestoreJob(virDomainObj *obj,
|
||||
int qemuDomainObjPreserveJob(virDomainObj *obj,
|
||||
qemuDomainJobObj *job);
|
||||
void qemuDomainObjDiscardAsyncJob(virDomainObj *obj);
|
||||
void qemuDomainObjReleaseAsyncJob(virDomainObj *obj);
|
||||
|
@ -8714,7 +8714,7 @@ qemuProcessReconnect(void *opaque)
|
||||
cfg = virQEMUDriverGetConfig(driver);
|
||||
priv = obj->privateData;
|
||||
|
||||
qemuDomainObjRestoreJob(obj, &oldjob);
|
||||
qemuDomainObjPreserveJob(obj, &oldjob);
|
||||
if (oldjob.asyncJob == VIR_ASYNC_JOB_MIGRATION_IN)
|
||||
stopFlags |= VIR_QEMU_PROCESS_STOP_MIGRATED;
|
||||
if (oldjob.asyncJob == VIR_ASYNC_JOB_BACKUP && priv->backup)
|
||||
|
Loading…
Reference in New Issue
Block a user