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, jasowang@redhat.com,
quintela@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 2/8] block: set snapshot option for block devices in blkreplay module
Date: Tue, 20 Sep 2016 15:43:11 +0300 [thread overview]
Message-ID: <002401d2133c$8c09be60$a41d3b20$@ru> (raw)
In-Reply-To: <8ebdaf52-f7f9-c6ac-3a85-3149b2e55346@redhat.com>
> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
> On 20/09/2016 14:31, Pavel Dovgalyuk wrote:
> > /* Open the image file */
> > bs->file = bdrv_open_child(NULL, options, "image",
> > @@ -40,6 +112,43 @@ static int blkreplay_open(BlockDriverState *bs, QDict *options, int
> flags,
> > goto fail;
> > }
> >
> > + opts = qemu_opts_create(&blkreplay_runtime_opts, NULL, 0, &error_abort);
> > + qemu_opts_absorb_qdict(opts, options, &local_err);
> > + if (local_err) {
> > + ret = -EINVAL;
> > + goto fail;
> > + }
> > +
> > + /* Prepare options QDict for the overlay file */
> > + qdict_put(snapshot_options, "file.driver",
> > + qstring_from_str("file"));
> > + qdict_put(snapshot_options, "driver",
> > + qstring_from_str("qcow2"));
> > +
> > + snapshot = qemu_opt_get(opts, "overlay");
> > + if (snapshot) {
> > + qdict_put(snapshot_options, "file.filename",
> > + qstring_from_str(snapshot));
> > + } else {
> > + char tmp_filename[PATH_MAX + 1];
> > + ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);
> > + if (ret < 0) {
> > + error_setg_errno(errp, -ret, "Could not get temporary filename");
> > + goto fail;
> > + }
>
> No, this is unnecessary. The image is unused in this case, so you can
> specify the overlay as image=foo.qcow2.
This branch allows user do not bother about overlays at all.
Driver will automatically create temporary snapshot.
Pavel Dovgalyuk
next prev parent reply other threads:[~2016-09-20 12:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 12:31 [Qemu-devel] [PATCH v3 0/8] replay additions Pavel Dovgalyuk
2016-09-20 12:31 ` [Qemu-devel] [PATCH v3 1/8] record/replay: add network support Pavel Dovgalyuk
2016-09-20 12:31 ` [Qemu-devel] [PATCH v3 2/8] block: set snapshot option for block devices in blkreplay module Pavel Dovgalyuk
2016-09-20 12:35 ` Paolo Bonzini
2016-09-20 12:43 ` Pavel Dovgalyuk [this message]
2016-09-20 12:57 ` Paolo Bonzini
2016-09-20 14:28 ` Kevin Wolf
2016-09-20 15:11 ` Pavel Dovgalyuk
2016-09-20 12:31 ` [Qemu-devel] [PATCH v3 3/8] block: don't make snapshots for filters Pavel Dovgalyuk
2016-09-20 12:31 ` [Qemu-devel] [PATCH v3 4/8] replay: save/load initial state Pavel Dovgalyuk
2016-09-20 12:37 ` Paolo Bonzini
2016-09-20 12:39 ` Pavel Dovgalyuk
2016-09-20 12:52 ` Paolo Bonzini
2016-09-20 13:37 ` Pavel Dovgalyuk
2016-09-20 13:45 ` Paolo Bonzini
2016-09-20 13:51 ` Pavel Dovgalyuk
2016-09-20 13:53 ` Paolo Bonzini
2016-09-20 12:31 ` [Qemu-devel] [PATCH v3 5/8] replay: move internal data to the structure Pavel Dovgalyuk
2016-09-20 12:32 ` [Qemu-devel] [PATCH v3 6/8] replay: vmstate for replay module Pavel Dovgalyuk
2016-09-20 12:32 ` [Qemu-devel] [PATCH v3 7/8] replay: allow replay stopping and restarting Pavel Dovgalyuk
2016-09-20 12:32 ` [Qemu-devel] [PATCH v3 8/8] integratorcp: adding vmstate for save/restore Pavel Dovgalyuk
2016-09-20 13:35 ` [Qemu-devel] [PATCH v3 0/8] replay additions no-reply
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='002401d2133c$8c09be60$a41d3b20$@ru' \
--to=dovgaluk@ispras.ru \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).