Message ID | 1437633138-29188-10-git-send-email-famz@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/block/io.c b/block/io.c index d4bc83b..fbf9e0f 100644 --- a/block/io.c +++ b/block/io.c @@ -2608,3 +2608,8 @@ void bdrv_flush_io_queue(BlockDriverState *bs) } bdrv_start_throttled_reqs(bs); } + +bool bdrv_aio_poll(AioContext *ctx, bool blocking) +{ + return aio_poll(ctx, blocking); +} diff --git a/include/block/block.h b/include/block/block.h index 37916f7..be99e6d 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -616,4 +616,6 @@ void bdrv_flush_io_queue(BlockDriverState *bs); BlockAcctStats *bdrv_get_stats(BlockDriverState *bs); +bool bdrv_aio_poll(AioContext *ctx, bool blocking); + #endif
This call is introduced simply as a wrapper of aio_poll, but it makes it is easy to change the polled client types. Signed-off-by: Fam Zheng <famz@redhat.com> --- block/io.c | 5 +++++ include/block/block.h | 2 ++ 2 files changed, 7 insertions(+)