On 15/09/2016 11:00, Pavel Dovgalyuk wrote:
> diff --git a/docs/replay.txt b/docs/replay.txt
> index 347b2ff..5be8f25 100644
> --- a/docs/replay.txt
> +++ b/docs/replay.txt
> @@ -196,6 +196,14 @@ 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.
>
> +blkdriver also supports overlay option, which allows creating persistent
> +overlay file for saving and reloading VM snapshots in record/replay modes.
> +Replay mechanism automatically creates one snapshot named 'replay_init' to
> +allow rewinding execution while replaying.
> +Overlay file may be specified as follows:
> + -drive driver=blkreplay,if=none,image=img-direct,
> + overlay=overlay.qcow2,id=img-blkreplay
So in this case the image is actually overlay.qcow2, and it is created
with img-direct as the backing file? Since you have to create
overlay.qcow2 outside QEMU anyway, overlay.qcow2 might as well be the
"image". That is, you could choose between:
-drive driver=blkreplay,if=none,image=overlay.qcow2,id=img-blkreplay \
-rr snapshot=replay_init,...
-drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay
The temporary snapshot would be created if there's no "-rr snapshot" option
on the command line.
Does this make sense?
Paolo
>
> +static QemuOptsList blkreplay_runtime_opts = {
> + .name = "quorum",
Pasto. ;)
> + .head = QTAILQ_HEAD_INITIALIZER(blkreplay_runtime_opts.head),
> + .desc = {
> + {
> + .name = "overlay",
> + .type = QEMU_OPT_STRING,
> + .help = "Optional overlay file for snapshots",
> + },
> + { /* end of list */ }
> + },
> +};