QEMUBH: make AioContext's bh re-entrant
authorLiu Ping Fan <qemulist@gmail.com>
Tue, 16 Jul 2013 04:28:58 +0000 (12:28 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 19 Jul 2013 04:29:21 +0000 (12:29 +0800)
commitdcc772e2f2b7c2a68644133fea2b874f6751a57b
tree4082fc020fff1669f1e81a70fe27921e6b393e55
parent9154b02c53bb6685797c973fcdbec51c4714777d
QEMUBH: make AioContext's bh re-entrant

BH will be used outside big lock, so introduce lock to protect
between the writers, ie, bh's adders and deleter. The lock only
affects the writers and bh's callback does not take this extra lock.
Note that for the same AioContext, aio_bh_poll() can not run in
parallel yet.

Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
async.c
include/block/aio.h