block: add aio_wait_bh_oneshot()
commitb89d92f3cfc0f6e6d05e146e7a5fb8c759978051
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 7 Mar 2018 14:42:02 +0000 (7 14:42 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 8 Mar 2018 17:38:51 +0000 (8 17:38 +0000)
tree36927b2b1c7f082a20f890ee7e4d5b0b84ce6f90
parent12c1c7d7cefb4dbffeb5712e75a33e4692f0a76b
block: add aio_wait_bh_oneshot()

Sometimes it's necessary for the main loop thread to run a BH in an
IOThread and wait for its completion.  This primitive is useful during
startup/shutdown to synchronize and avoid race conditions.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20180307144205.20619-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/block/aio-wait.h
util/aio-wait.c