All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: 'Paolo Bonzini' <pbonzini@redhat.com>,
	'Pavel Dovgalyuk' <pavel.dovgaluk@ispras.ru>,
	qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, quintela@redhat.com,
	jasowang@redhat.com, mst@redhat.com, agraf@suse.de,
	david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v2 02/10] block: set snapshot option for block devices in blkreplay module
Date: Fri, 16 Sep 2016 12:36:21 +0300	[thread overview]
Message-ID: <002b01d20ffd$c911dfa0$5b359ee0$@ru> (raw)
In-Reply-To: <e345966e-e7e1-45b6-4409-ae3b9613545a@redhat.com>

> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini
> On 16/09/2016 09:55, Pavel Dovgalyuk wrote:
> >> 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?
> >
> > There are two different parts:
> >  - creating an overlay
> >  - creating the snapshot
> >
> > Overlay is needed to preserve the state of the original backing file.
> > In the current version temporary overlay is always created at start of qemu.
> 
> Yes, this would still be the default for rr mode.
> 
> > I don't think that it is convenient forcing user to create overlay manually.
> 
> Note that all I'm only saying that _only for the case where the user
> creates the overlay manually anyway_ there is no need to specify both
> image and overlay.  (I also don't like particularly the hard-coded
> snapshot name replay_init, which can be overridden by -loadvm but not
> when saving).

Ok, this seems reasonable to fix.

> 
> So there are various possibilites:
> 
> First proposal:
> 
> - automatically created overlay is -icount rr=record|replay (then
> snapshot name doesn't matter, it can be replay_init)
> 
> - manually created overlay is -icount
> rr=record|replay,rrsnapshot=snapname (then snapshot name matters because
> you can have different snapshots in the same file)

We can't create overlay with icount suboptions, because there could be several
block devices. Each one needs its own overlay.

> If rr is enabled but rrsnapshot is absent, configure_icount can just set
> "snapshot = 1" to force creation of the temporary overlay.  This
> requires no change to the blkreplay driver
> 
> 
> Second proposal:
> 
> - automatically created overlay is -icount rr=record|replay -snapshot
> 
> - manually created overlay is -icount rr=record|replay and an rrsnapshot
> suboption can be added anyway if considered useful.

See above.

> This requires no change to the blkreplay driver either.  It's a little
> more verbose in the common case, but perhaps less surprising if you're
> already used to -snapshot.

Our internal version automatically creates overlays with generated names.
But now I think, that it is inconvenient and manual name specification is better.

> > Common debugging scenario includes multiple recording passes until the bug manifests
> > itself. Every new execution recorded should be accompanied by creating an overlay
> > to assure that the execution is started from the same disk state.
> >
> > Specifying initial snapshot name makes sense if we want to suppress -loadvm option.
> 
> My rationale was to have similar command lines between record and replay
> modes (just changing rr=record to rr=replay).

This seems reasonable, I'll try to fix this part.

Pavel Dovgalyuk

  reply	other threads:[~2016-09-16  9:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15  9:00 [Qemu-devel] [PATCH v2 00/10] replay additions Pavel Dovgalyuk
2016-09-15  9:00 ` [Qemu-devel] [PATCH v2 01/10] record/replay: add network support Pavel Dovgalyuk
2016-09-15  9:00 ` [Qemu-devel] [PATCH v2 02/10] block: set snapshot option for block devices in blkreplay module Pavel Dovgalyuk
2016-09-15  9:25   ` Paolo Bonzini
2016-09-15  9:36     ` Paolo Bonzini
2016-09-16  7:55     ` Pavel Dovgalyuk
2016-09-16  9:28       ` Paolo Bonzini
2016-09-16  9:36         ` Pavel Dovgalyuk [this message]
2016-09-16  9:49           ` Paolo Bonzini
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 03/10] block: don't make snapshots for filters Pavel Dovgalyuk
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 04/10] replay: save/load initial state Pavel Dovgalyuk
2016-09-15  9:25   ` Paolo Bonzini
2016-09-16  7:56     ` Pavel Dovgalyuk
2016-09-16  9:29       ` Paolo Bonzini
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 05/10] replay: move internal data to the structure Pavel Dovgalyuk
2016-09-15  9:34   ` Paolo Bonzini
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 06/10] replay: vmstate for replay module Pavel Dovgalyuk
2016-09-15  9:37   ` Paolo Bonzini
2016-09-16  7:36     ` Pavel Dovgalyuk
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 07/10] replay: allow replay stopping and restarting Pavel Dovgalyuk
2016-09-15  9:38   ` Paolo Bonzini
2016-09-16  6:35     ` Pavel Dovgalyuk
2016-09-16  8:55       ` Paolo Bonzini
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 08/10] kvmvapic: fix state change handler Pavel Dovgalyuk
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 09/10] pcspk: adding vmstate for save/restore Pavel Dovgalyuk
2016-09-15  9:01 ` [Qemu-devel] [PATCH v2 10/10] integratorcp: " Pavel Dovgalyuk
2016-09-15  9:12 ` [Qemu-devel] [PATCH v2 00/10] replay additions Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002b01d20ffd$c911dfa0$5b359ee0$@ru' \
    --to=dovgaluk@ispras.ru \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.