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

Re: [libvirt] [PATCHv6 6/8] blockjob: implement block copy for qemu



On 04/23/2012 08:49 PM, Eric Blake wrote:
> Minimal patch to wire up all the pieces in the previous patches
> to actually enable a block copy job.  By minimal, I mean that
> qemu creates the file (that is, no REUSE_EXT flag support yet),
> SELinux must be disabled, a lock manager is not informed, and
> the audit logs aren't updated.  But those will be added as
> improvements in future patches.
> 
> * src/qemu/qemu_driver.c (qemuDomainBlockCopy): New function.
> (qemuDomainBlockRebase): Call it when appropriate.
> ---
> 
> v6: no real changes from v5
> 
>  src/qemu/qemu_driver.c |  124 +++++++++++++++++++++++++++++++++++++++++++++++-
>  1 files changed, 122 insertions(+), 2 deletions(-)

Squash this in to deal with the recent change to block-stream taking a
speed argument, since that fix deletes BLOCK_JOB_SPEED_INTERNAL.

diff --git i/src/qemu/qemu_driver.c w/src/qemu/qemu_driver.c
index 4b5c8ad..045c8da 100644
--- i/src/qemu/qemu_driver.c
+++ w/src/qemu/qemu_driver.c
@@ -12005,6 +12005,12 @@ qemuDomainBlockCopy(virDomainPtr dom, const
char *path,
                         _("block copy is not supported with this QEMU
binary"));
         goto cleanup;
     }
+    if (bandwidth) {
+        qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                        _("setting initial speed of block copy is not "
+                          "supported with this QEMU binary"));
+        goto cleanup;
+    }
     if (vm->persistent) {
         /* XXX if qemu ever lets us start a new domain with mirroring
          * already active, we can relax this; but for now, the risk of
@@ -12040,9 +12046,6 @@ qemuDomainBlockCopy(virDomainPtr dom, const char
*path,
     /* Actually start the mirroring */
     qemuDomainObjEnterMonitorWithDriver(driver, vm);
     ret = qemuMonitorDriveMirror(priv->mon, device, dest, format, flags);
-    if (ret == 0 && bandwidth != 0)
-        ret = qemuMonitorBlockJob(priv->mon, device, NULL, bandwidth, NULL,
-                                  BLOCK_JOB_SPEED_INTERNAL, true);
     qemuDomainObjExitMonitorWithDriver(driver, vm);

 endjob:


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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