aboutsummaryrefslogtreecommitdiff
path: root/block/vxhs.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2019-09-17 14:58:19 +0300
committerKevin Wolf <kwolf@redhat.com>2019-10-14 17:12:48 +0200
commite4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc (patch)
treefb5bb4af2ee8c376cb3a237c46604a283514e208 /block/vxhs.c
parentae25dccb7df64ec9cbb52d7a0a67308d74372cfd (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/vxhs.c')
-rw-r--r--block/vxhs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/vxhs.c b/block/vxhs.c
index 77fd5eb20d..d79fc97df6 100644
--- a/block/vxhs.c
+++ b/block/vxhs.c
@@ -22,6 +22,7 @@
#include "qapi/error.h"
#include "qemu/uuid.h"
#include "crypto/tlscredsx509.h"
+#include "sysemu/replay.h"
#define VXHS_OPT_FILENAME "filename"
#define VXHS_OPT_VDISK_ID "vdisk-id"
@@ -105,8 +106,8 @@ static void vxhs_iio_callback(void *ctx, uint32_t opcode, uint32_t error)
trace_vxhs_iio_callback(error);
}
- aio_bh_schedule_oneshot(bdrv_get_aio_context(acb->common.bs),
- vxhs_complete_aio_bh, acb);
+ replay_bh_schedule_oneshot_event(bdrv_get_aio_context(acb->common.bs),
+ vxhs_complete_aio_bh, acb);
break;
default: