mirror_qemu/include
Kevin Wolf b5a7a05735 blockjob: Lie better in child_job_drained_poll()
Block jobs claim in .drained_poll() that they are in a quiescent state
as soon as job->deferred_to_main_loop is true. This is obviously wrong,
they still have a completion BH to run. We only get away with this
because commit 91af091f92 added an unconditional aio_poll(false) to the
drain functions, but this is bypassing the regular drain mechanisms.

However, just removing this and telling that the job is still active
doesn't work either: The completion callbacks themselves call drain
functions (directly, or indirectly with bdrv_reopen), so they would
deadlock then.

As a better lie, tell that the job is active as long as the BH is
pending, but falsely call it quiescent from the point in the BH when the
completion callback is called. At this point, nested drain calls won't
deadlock because they ignore the job, and outer drains will wait for the
job to really reach a quiescent state because the callback is already
running.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2018-09-25 15:50:15 +02:00
..
block aio-wait: Increase num_waiters even in home thread 2018-09-25 15:50:15 +02:00
chardev chardev/char-fe: Fix typos 2018-08-23 13:32:50 +02:00
crypto tests: call qcrypto_init instead of gnutls_global_init 2018-07-24 17:33:39 +01:00
disas RISC-V Disassembler 2018-03-07 08:30:28 +13:00
exec ppc: Remove deprecated ppcemb target 2018-08-28 11:31:23 +10:00
fpu softfloat: Add scaling float-to-int routines 2018-08-24 13:17:30 +01:00
hw ppc patch queue 2018-09-25 2018-09-25 13:30:45 +01: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 vmstate.h: Provide VMSTATE_UINT16_SUB_ARRAY 2018-08-14 17:17:20 +01:00
monitor monitor: Fix unsafe sharing of @cur_mon among threads 2018-07-23 14:00:03 +02:00
net net: Remove the deprecated -tftp, -bootp, -redir and -smb options 2018-08-31 09:53:03 +02:00
qapi Monitor patches for 2018-09-01 2018-09-24 15:43:33 +01:00
qemu blockjob: Lie better in child_job_drained_poll() 2018-09-25 15:50:15 +02:00
qom qom: convert the CPU list to RCU 2018-08-23 18:46:25 +02:00
scsi pr-manager: add query-pr-managers QMP command 2018-06-28 19:05:35 +02:00
standard-headers fw_cfg: import & use linux/qemu_fw_cfg.h 2018-08-23 18:46:25 +02:00
sysemu fw_cfg: ignore suffixes in the bootdevice list dependent on machine class 2018-08-16 22:27:43 -03:00
ui dmabuf: add y0_top, pass it to spice 2018-08-24 08:40:11 +02:00
elf.h elf: Add EM_NANOMIPS value as a valid one for e_machine field 2018-08-24 17:51:59 +02:00
glib-compat.h glib: enforce the minimum required version and warn about old APIs 2018-06-29 12:22:28 +01:00
qemu-common.h qemu-options: Bail out on unsupported options instead of silently ignoring them 2018-05-09 00:13:39 +02:00
qemu-io.h qemu-io: Let command functions return error code 2018-06-11 16:18:45 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00