summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2016-03-14 10:45:10 +0300
committerKevin Wolf <kwolf@redhat.com>2016-03-30 12:15:57 +0200
commit63785678f3941c84be01d3ab7867e2742ea9fe3e (patch)
tree789d6d22b463e23ea5737ce9036c8160eccfab1a /docs
parent95b4aed5fd0bec00e2c3f754c86fec5ba7a83a20 (diff)
downloadqemu-63785678f3941c84be01d3ab7867e2742ea9fe3e.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')
-rw-r--r--docs/replay.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/replay.txt b/docs/replay.txt
index 3cedc25b2e..779c6c059e 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.