
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@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org