]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
block: Repair the throttling code.
authorBenoît Canet <benoit@irqsave.net>
Fri, 26 Jul 2013 20:39:22 +0000 (22:39 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 29 Jul 2013 15:07:37 +0000 (17:07 +0200)
commitb681a1c73e15e08c70c10cccd9c9f5b65cca12e8
treec45ec2924cb5aae1e5cb1b23ac9cdcaf6591741a
parent42ec24e2851674e0899f71933e0d7d9125f31d76
block: Repair the throttling code.

The throttling code was segfaulting since commit
02ffb504485f0920cfc75a0982a602f824a9a4f4 because some qemu_co_queue_next caller
does not run in a coroutine.
qemu_co_queue_do_restart assume that the caller is a coroutinne.
As suggested by Stefan fix this by entering the coroutine directly.
Also make sure like suggested that qemu_co_queue_next() and
qemu_co_queue_restart_all() can be called only in coroutines.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block.c
include/block/coroutine.h
qemu-coroutine-lock.c