From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkSvU-0008C5-85 for qemu-devel@nongnu.org; Thu, 15 Sep 2016 05:25:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkSvP-0000U2-5G for qemu-devel@nongnu.org; Thu, 15 Sep 2016 05:25:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkSvO-0000Sg-PK for qemu-devel@nongnu.org; Thu, 15 Sep 2016 05:25:43 -0400 References: <20160915090042.6440.22516.stgit@PASHA-ISP> <20160915090054.6440.77726.stgit@PASHA-ISP> From: Paolo Bonzini Message-ID: <7d034a73-77d6-d79f-7b7b-137d8408e514@redhat.com> Date: Thu, 15 Sep 2016 11:25:36 +0200 MIME-Version: 1.0 In-Reply-To: <20160915090054.6440.77726.stgit@PASHA-ISP> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 02/10] block: set snapshot option for block devices in blkreplay module List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mst@redhat.com, jasowang@redhat.com, quintela@redhat.com, agraf@suse.de, david@gibson.dropbear.id.au 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 process= ed > deterministically. > =20 > +blkdriver also supports overlay option, which allows creating persiste= nt > +overlay file for saving and reloading VM snapshots in record/replay mo= des. > +Replay mechanism automatically creates one snapshot named 'replay_init= ' to > +allow rewinding execution while replaying. > +Overlay file may be specified as follows: > + -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct, > + overlay=3Doverlay.qcow2,id=3Dimg-blkreplay So in this case the image is actually overlay.qcow2, and it is created=20 with img-direct as the backing file? Since you have to create=20 overlay.qcow2 outside QEMU anyway, overlay.qcow2 might as well be the=20 "image". That is, you could choose between: -drive driver=3Dblkreplay,if=3Dnone,image=3Doverlay.qcow2,id=3Dimg-blk= replay \ -rr snapshot=3Dreplay_init,... -drive driver=3Dblkreplay,if=3Dnone,image=3Dimg-direct,id=3Dimg-blkrep= lay The temporary snapshot would be created if there's no "-rr snapshot" opti= on on the command line. Does this make sense? Paolo >=20 > +static QemuOptsList blkreplay_runtime_opts =3D { > + .name =3D "quorum", Pasto. ;) > + .head =3D QTAILQ_HEAD_INITIALIZER(blkreplay_runtime_opts.head), > + .desc =3D { > + { > + .name =3D "overlay", > + .type =3D QEMU_OPT_STRING, > + .help =3D "Optional overlay file for snapshots", > + }, > + { /* end of list */ } > + }, > +};