[libvirt] [PATCHv6 9/8] blockjob: allow speed setting in block copy

Stefan Berger stefanb at linux.vnet.ibm.com
Thu Apr 26 20:38:29 UTC 2012


On 04/26/2012 04:15 PM, Eric Blake wrote:
> Similar to the recent race fix for 'block-stream', it is possible
> to set the speed of a block copy job up front thanks to an optional
> 'speed' parameter to 'drive-mirror'.
>
> * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDriveMirror): Set
> speed at job start.
> * src/qemu/qemu_monitor_json.h (qemuMonitorJSONDriveMirror): Add
> parameter.
> * src/qemu/qemu_monitor.h (qemuMonitorDriveMirror): Likewise.
> * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Adjust caller.
> * src/qemu/qemu_monitor.c (qemuMonitorDriveMirror): Likewise.
> ---
>
> v6: new patch.  I haven't actually seen a qemu patch implementing this
> yet, but it is a logical extension of the recent block-stream patch.
>

Hm,  not sure what this means compared to what you write on the top...

> -    VIR_DEBUG("mon=%p, device=%s, file=%s, format=%s, flags=%x",
> -              mon, device, file, NULLSTR(format), flags);
> +    /* Convert bandwidth MiB to bytes */
> +    if (bandwidth>  ULLONG_MAX / 1024 / 1024) {

ULLONG_MAX / (1024 * 1024)  -- but yours is also fine...

ACK.

     Stefan




More information about the libvir-list mailing list