qemu/include
Stefan Hajnoczi 7376eda7c2 block: make BDRV_POLL_WHILE() re-entrancy safe
Nested BDRV_POLL_WHILE() calls can occur.  Currently
assert(!wait_->wakeup) fails in AIO_WAIT_WHILE() when this happens.

This patch converts the bool wait_->need_kick flag to an unsigned
wait_->num_waiters counter.

Nesting works correctly because outer AIO_WAIT_WHILE() callers evaluate
the condition again after the inner caller completes (invoking the inner
caller counts as aio_poll() progress).

Reported-by: "fuweiwei (C)" <fuweiwei2@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180307124619.6218-1-stefanha@redhat.com
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-03-12 11:07:37 +00:00
..
block block: make BDRV_POLL_WHILE() re-entrancy safe 2018-03-12 11:07:37 +00:00
chardev Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
crypto Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
disas RISC-V Disassembler 2018-03-07 08:30:28 +13:00
exec address_space_read: address_space_to_flatview needs RCU lock 2018-03-06 14:01:28 +01:00
fpu softfloat: use floatx80_infinity in softfloat 2018-03-04 17:27:35 +01:00
hw QEMU RISC-V Emulation Support (RV64GC, RV32GC) 2018-03-09 10:58:57 +00:00
io qio: non-default context for TLS handshake 2018-03-06 10:19:07 +00:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
monitor qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
net -----BEGIN PGP SIGNATURE----- 2018-03-05 14:27:24 +00:00
qapi qapi: Move qapi-schema.json to qapi/, rename generated files 2018-03-02 13:45:57 -06:00
qemu lockable: workaround GCC link issue with ASAN 2018-03-06 14:01:27 +01:00
qom qmp: Add qom-list-properties to list QOM object properties 2018-03-06 14:01:26 +01:00
scsi Include qapi/qmp/qdict.h exactly where needed 2018-02-09 13:52:15 +01:00
standard-headers virtio-gpu-3d: add support for second capability set (v4) 2018-02-26 13:41:34 +01:00
sysemu -----BEGIN PGP SIGNATURE----- 2018-03-09 17:28:16 +00:00
ui ui: build curses, gtk and sdl as modules. 2018-03-05 15:16:30 +00:00
elf.h RISC-V ELF Machine Definition 2018-03-07 08:30:28 +13:00
glib-compat.h glib-compat: move G_SOURCE_CONTINUE/REMOVE there 2017-10-10 16:33:55 +02:00
qemu-common.h Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00