diff options
author | Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> | 2019-09-17 14:58:19 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-10-14 17:12:48 +0200 |
commit | e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc (patch) | |
tree | fb5bb4af2ee8c376cb3a237c46604a283514e208 /block/rbd.c | |
parent | ae25dccb7df64ec9cbb52d7a0a67308d74372cfd (diff) |
replay: add BH oneshot event for block layer
Replay is capable of recording normal BH events, but sometimes
there are single use callbacks scheduled with aio_bh_schedule_oneshot
function. This patch enables recording and replaying such callbacks.
Block layer uses these events for calling the completion function.
Replaying these calls makes the execution deterministic.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/rbd.c')
-rw-r--r-- | block/rbd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/rbd.c b/block/rbd.c index 057af43d48..c71e45d7c3 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -22,6 +22,7 @@ #include "block/qdict.h" #include "crypto/secret.h" #include "qemu/cutils.h" +#include "sysemu/replay.h" #include "qapi/qmp/qstring.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qjson.h" @@ -884,8 +885,8 @@ static void rbd_finish_aiocb(rbd_completion_t c, RADOSCB *rcb) rcb->ret = rbd_aio_get_return_value(c); rbd_aio_release(c); - aio_bh_schedule_oneshot(bdrv_get_aio_context(acb->common.bs), - rbd_finish_bh, rcb); + replay_bh_schedule_oneshot_event(bdrv_get_aio_context(acb->common.bs), + rbd_finish_bh, rcb); } static int rbd_aio_discard_wrapper(rbd_image_t image, |