summaryrefslogtreecommitdiffstats
path: root/docs/replay.txt
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2016-03-14 10:45:10 +0300
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 20:01:34 -0600
commit6fc68b5064616e728bc9bb59763b261e7e7c1964 (patch)
treefd971da871fa7b102639c8a2814256ee9575a94d /docs/replay.txt
parent455d26b7d304252c9a50eb9ff995a98057c2bd2e (diff)
downloadhqemu-6fc68b5064616e728bc9bb59763b261e7e7c1964.zip
hqemu-6fc68b5064616e728bc9bb59763b261e7e7c1964.tar.gz
replay: introduce block devices record/replay
This patch introduces block driver that implement recording and replaying of block devices' operations. All block completion operations are added to the queue. Queue is flushed at checkpoints and information about processed requests is recorded to the log. In replay phase the queue is matched with events read from the log. Therefore block devices requests are processed deterministically. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> [ kwolf: Rebased onto modified and already applied part of the series ] Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'docs/replay.txt')
-rw-r--r--docs/replay.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/replay.txt b/docs/replay.txt
index 3cedc25..779c6c0 100644
--- a/docs/replay.txt
+++ b/docs/replay.txt
@@ -175,3 +175,23 @@ Sometimes the block layer uses asynchronous callbacks for its internal purposes
(like reading or writing VM snapshots or disk image cluster tables). In this
case bottom halves are not marked as "replayable" and do not saved
into the log.
+
+Block devices
+-------------
+
+Block devices record/replay module intercepts calls of
+bdrv coroutine functions at the top of block drivers stack.
+To record and replay block operations the drive must be configured
+as following:
+ -drive file=disk.qcow,if=none,id=img-direct
+ -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay
+ -device ide-hd,drive=img-blkreplay
+
+blkreplay driver should be inserted between disk image and virtual driver
+controller. Therefore all disk requests may be recorded and replayed.
+
+All block completion operations are added to the queue in the coroutines.
+Queue is flushed at checkpoints and information about processed requests
+is recorded to the log. In replay phase the queue is matched with
+events read from the log. Therefore block devices requests are processed
+deterministically.
OpenPOWER on IntegriCloud