From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmLEz-0003HC-Jh for qemu-devel@nongnu.org; Tue, 20 Sep 2016 09:37:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmLEt-0006Om-P2 for qemu-devel@nongnu.org; Tue, 20 Sep 2016 09:37:40 -0400 Received: from mail.ispras.ru ([83.149.199.45]:35472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmLEq-0006Ad-Ff for qemu-devel@nongnu.org; Tue, 20 Sep 2016 09:37:35 -0400 From: "Pavel Dovgalyuk" References: <20160920123126.5400.29283.stgit@PASHA-ISP.def.inno> <20160920123149.5400.87854.stgit@PASHA-ISP.def.inno> <85a6ea4b-880c-cb06-edc1-af19b480ccd3@redhat.com> <002301d2133c$18cbf170$4a63d450$@ru> In-Reply-To: Date: Tue, 20 Sep 2016 16:37:13 +0300 Message-ID: <002b01d21344$18909c80$49b1d580$@ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH v3 4/8] replay: save/load initial state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , 'Pavel Dovgalyuk' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jasowang@redhat.com, quintela@redhat.com, mst@redhat.com, 'Kevin Wolf' > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > On 20/09/2016 14:39, Pavel Dovgalyuk wrote: > > > > + replay_snapshot = g_strdup(qemu_opt_get(opts, "rrsnapshot")); > > > > + > > > > replay_enable(fname, mode); > > > > > > > > > > Should you set snapshot = 1 here if there is no rrsnapshot option? > > > > No, because there is default snapshot name for the case when user > > specifies overlay for the drives. > > There are three possibilities: > > a) these patches: > with implicit overlay: > -drive file=disk.raw,if=none,id=img-direct > -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay > > with explicit overlay: > -drive file=disk.raw,if=none,id=img-direct > -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay,overlay=foo.qcow2 > > Advantages: > - does the right thing in the "implicit overlay" case. - automatically creates overlay > > Disadvantages: > - no need really to specify disk.raw in the "explicit overlay" case, since > it's already specified when you create the overlay with qemu-img. > > Vote for implicit overlay: excellent > Vote for explicit overlay: bad (need to track two file names) Disadvantage is for replay only. Running QEMU in record mode automatically creates overlay. Therefore two filenames are required. > c) no rrsnapshot implies -snapshot: > without overlay: > -drive file=disk.raw,if=none,id=img-direct > -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay > > with overlay: > -drive file=foo.qcow2,if=none,id=img-direct > -drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay > -icount ...,rrsnapshot=snapname But how record will create this overlay? This method requires creating overlay manually, because backing file is not specified at all. Pavel Dovgalyuk