From e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Tue, 17 Sep 2019 14:58:19 +0300 Subject: 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 Acked-by: Kevin Wolf Signed-off-by: Kevin Wolf --- stubs/replay-user.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 stubs/replay-user.c (limited to 'stubs/replay-user.c') diff --git a/stubs/replay-user.c b/stubs/replay-user.c new file mode 100644 index 0000000000..2ad9e27203 --- /dev/null +++ b/stubs/replay-user.c @@ -0,0 +1,9 @@ +#include "qemu/osdep.h" +#include "sysemu/replay.h" +#include "sysemu/sysemu.h" + +void replay_bh_schedule_oneshot_event(AioContext *ctx, + QEMUBHFunc *cb, void *opaque) +{ + aio_bh_schedule_oneshot(ctx, cb, opaque); +} -- cgit v1.2.3-55-g7522