[PATCH 12/25] qemu: driver: Remove unnecessary saving of status XML

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

 



Now that the blockjob handling code deals with the status XML we don't
need to save it explicitly when starting blockjobs.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a0c246a416..a1dc2634ca 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17012,7 +17012,6 @@ qemuDomainBlockPullCommon(virQEMUDriverPtr driver,
                           unsigned int flags)
 {
     qemuDomainObjPrivatePtr priv = vm->privateData;
-    VIR_AUTOUNREF(virQEMUDriverConfigPtr) cfg = virQEMUDriverGetConfig(driver);
     VIR_AUTOFREE(char *) device = NULL;
     virDomainDiskDefPtr disk;
     virStorageSourcePtr baseSource = NULL;
@@ -17102,10 +17101,6 @@ qemuDomainBlockPullCommon(virQEMUDriverPtr driver,

     qemuBlockJobStarted(job, vm);

-    if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0)
-        VIR_WARN("Unable to save status on vm %s after state change",
-                 vm->def->name);
-
  endjob:
     qemuDomainObjEndJob(driver, vm);

@@ -17682,10 +17677,6 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
     disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_COPY;
     qemuBlockJobStarted(job, vm);

-    if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0)
-        VIR_WARN("Unable to save status on vm %s after state change",
-                 vm->def->name);
-
  endjob:
     if (need_unlink && virStorageFileUnlink(mirror) < 0)
         VIR_WARN("%s", _("unable to remove just-created copy target"));
@@ -17880,7 +17871,6 @@ qemuDomainBlockCommit(virDomainPtr dom,
                       unsigned int flags)
 {
     virQEMUDriverPtr driver = dom->conn->privateData;
-    VIR_AUTOUNREF(virQEMUDriverConfigPtr) cfg = NULL;
     qemuDomainObjPrivatePtr priv;
     virDomainObjPtr vm = NULL;
     VIR_AUTOFREE(char *) device = NULL;
@@ -17909,7 +17899,6 @@ qemuDomainBlockCommit(virDomainPtr dom,
     if (!(vm = qemuDomObjFromDomain(dom)))
         goto cleanup;
     priv = vm->privateData;
-    cfg = virQEMUDriverGetConfig(driver);

     if (virDomainBlockCommitEnsureACL(dom->conn, vm->def) < 0)
         goto cleanup;
@@ -18072,10 +18061,6 @@ qemuDomainBlockCommit(virDomainPtr dom,
     }
     qemuBlockJobStarted(job, vm);

-    if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0)
-        VIR_WARN("Unable to save status on vm %s after block job",
-                 vm->def->name);
-
  endjob:
     if (ret < 0 && clean_access) {
         virErrorPtr orig_err = virSaveLastError();
-- 
2.21.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