diff options
author | Pavel Dovgalyuk | 2019-09-17 13:58:19 +0200 |
---|---|---|
committer | Kevin Wolf | 2019-10-14 17:12:48 +0200 |
commit | e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc (patch) | |
tree | fb5bb4af2ee8c376cb3a237c46604a283514e208 /stubs | |
parent | replay: finish record/replay before closing the disks (diff) | |
download | qemu-e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc.tar.gz qemu-e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc.tar.xz qemu-e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc.zip |
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 'stubs')
-rw-r--r-- | stubs/Makefile.objs | 1 | ||||
-rw-r--r-- | stubs/replay-user.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index 9c7393b08c..4a50e95ec3 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -20,6 +20,7 @@ stub-obj-y += monitor.o stub-obj-y += notify-event.o stub-obj-y += qtest.o stub-obj-y += replay.o +stub-obj-y += replay-user.o stub-obj-y += runstate-check.o stub-obj-y += set-fd-handler.o stub-obj-y += sysbus.o 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); +} |