[libvirt] [PATCHv2 14/16] blockjob: manage qemu block-commit monitor command
Eric Blake
eblake at redhat.com
Tue Oct 16 21:29:08 UTC 2012
On 10/16/2012 03:18 PM, Laine Stump wrote:
> On 10/13/2012 06:00 PM, Eric Blake wrote:
>> qemu 1.3 will be adding a 'block-commit' monitor command, per
>> qemu.git commit ed61fc1. It matches nicely to the libvirt API
>> virDomainBlockCommit.
>
> Hmm. Imagine that. What serendipity. I wonder how that could have
> happened. etc.... :-)
Shall I just look the other way, and pretend that the addition of
virDomainBlockCommit API in 0.10.2 with no implementation until now was
a pure accident? :)
>> +/* speed is in bytes/sec */
>> +int
>> +qemuMonitorJSONBlockCommit(qemuMonitorPtr mon, const char *device,
>> + const char *top, const char *base,
>> + unsigned long speed)
>
> up above you're using unsigned long long for speed. If
> qemuMonitorJSONMakeCommand only accepts unsigned long, shouldn't you be
> limiting bandwidth in the caller to ULONG_MAX / 1024 / 1024?
Oops - you caught me. _This_ speed parameter, like
qemuMonitorJSONBlockJob, should have been 'unsigned long long', since
qemu_monitor.c already took care of overflow detection while converting
MB/sec to bytes/sec. I'll fix that in v3.
>
> ACK dependent on your answer about unsigned long vs. unsigned long long
> and "speed".
Oh dear, I think I walked right into a bad pun about crack code.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121016/ebda5945/attachment-0001.sig>
More information about the libvir-list
mailing list