]> git.proxmox.com Git - mirror_qemu.git/commit - qemu-img.c
qemu-img: fix in-flight count for qemu-img bench
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 7 Dec 2016 15:08:27 +0000 (16:08 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 9 Jan 2017 12:30:13 +0000 (13:30 +0100)
commit4baaa8c3d891b57036fd2a7c6a890737793fe3a0
tree7f949cc08bcfe8a0ff5a2eff9d4e3203b0c28392
parentffe22bf51065dd33022cf91f77a821d1f11c250d
qemu-img: fix in-flight count for qemu-img bench

With aio=native (qemu-img bench -n) one or more requests can be completed
when a new request is submitted.  This in turn can cause bench_cb to
recurse before b->in_flight is updated.  This causes multiple I/Os
to be submitted with the same offset and, furthermore, the blk_aio_*
coroutines are never freed and qemu-img aborts.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img.c