-
由 Stefan Hajnoczi 提交于
If two Linux AIO request completions are fetched in the same io_getevents() call, QEMU will deadlock if request A's callback waits for request B to complete using an aio_poll() loop. This was reported to happen with the mirror blockjob. This patch moves completion processing into a BH and makes it resumable. Nested event loops can resume completion processing so that request B will complete and the deadlock will not occur. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Ming Lei <ming.lei@canonical.com> Cc: Marcin Gibuła <m.gibula@beyond.pl> Reported-by: NMarcin Gibuła <m.gibula@beyond.pl> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Tested-by: NMarcin Gibuła <m.gibula@beyond.pl>
2cdff7f6