[libvirt] [PATCHv2] blockjob: fix block-stream bandwidth race

Eric Blake eblake at redhat.com
Fri Apr 27 19:24:24 UTC 2012


On 04/27/2012 06:37 AM, Jiri Denemark wrote:
> On Thu, Apr 26, 2012 at 13:08:36 -0600, Eric Blake wrote:
>> With RHEL 6.2, virDomainBlockPull(dom, dev, bandwidth, 0) has a race
>> with non-zero bandwidth: there is a window between the block_stream
>> and block_job_set_speed monitor commands where an unlimited amount
>> of data was let through, defeating the point of a throttle.
>>

>>
>> * src/qemu/qemu_monitor.h (enum BLOCK_JOB_CMD): Drop unused value,
>> rename enum to match conventions.
>> * src/qemu/qemu_monitor.c (qemuMonitorBlockJob): Reflect enum rename.
>> * src/qemu_qemu_monitor_json.h (qemuMonitorJSONBlockJob): Likewise.
>> * src/qemu/qemu_monitor_json.c (qemuMonitorJSONBlockJob): Likewise,
>> and support difference between RHEL 6.2 and qemu 1.1 block pull.
>> * src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Reject
>> bandwidth during pull with too-old qemu.
>> * src/libvirt.c (virDomainBlockPull, virDomainBlockRebase):
>> Document this.
>> ---
>>
>> v2: fix integer overflow, improve variable naming
>>
>>  src/libvirt.c                |    8 ++++-
>>  src/qemu/qemu_driver.c       |    8 +++--
>>  src/qemu/qemu_monitor.c      |   25 +++++++++++++-----
>>  src/qemu/qemu_monitor.h      |   15 +++++-----
>>  src/qemu/qemu_monitor_json.c |   59 +++++++++++++++++++++++------------------
>>  src/qemu/qemu_monitor_json.h |    6 ++--
>>  6 files changed, 72 insertions(+), 49 deletions(-)
> 
> ACK

Thanks, pushed.

-- 
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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120427/60f2d3b8/attachment-0001.sig>


More information about the libvir-list mailing list