All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Alberto Garcia <berto@igalia.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 3/4] block: add a 'blockdev-snapshot' QMP command
Date: Mon, 14 Sep 2015 16:08:07 +0200	[thread overview]
Message-ID: <w51lhc9gkl4.fsf@maestria.local.igalia.com> (raw)
In-Reply-To: <55F31633.6010800@redhat.com>

On Fri 11 Sep 2015 07:58:11 PM CEST, Eric Blake wrote:

>> +void qmp_blockdev_snapshot(const char *device, const char *snapshot,
>> +                           Error **errp)
>> +{
>> +    BlockdevSnapshot snapshot_data = {
>> +        .device = (char *) device,
>> +        .snapshot = (char *) snapshot
>> +    };
>
> Hmm. Sounds like you'd love to use my pending 'box':true qapi glue to
> make this function have the saner signature of
>
> void qmp_blockdev_snapshot(BlockdevSnapshot *arg, Error **errp);
>
> rather than having to rebuild the struct yourself (with an annoying
> cast to lose const) :)
> https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02599.html

That's cool! We can simplify this later as you suggest.

>> +Create a snapshot, by installing 'device' as the backing image of
>> +'snapshot'. Additionally, if 'device' is associated with a block
>> +device, the block device changes to using 'snapshot' as its new
>> +active image.
>
> Still didn't answer the question from the earlier review of whether
> the blockdev-snapshot-sync behavior of specifying the node name of an
> active layer in order to not pivot the block device to the snapshot
> still makes sense to support in the blockdev-snapshot case.

Sorry if I overlooked the explanation, but I still didn't get the use
case for this.

And particularly for this command, that doesn't create any image but
simply uses a previously-opened one.

What would 'pivot': false do ? As far as I can see, specifying the node
name of an active layer in blockdev-snapshot-sync seems to pivot the
block device to the snapshot.

{ "execute": "blockdev-snapshot-sync",
             "arguments": { "node-name": "hd0",
                            "snapshot-file": "hd1.qcow2",
                            "snapshot-node-name": "hd1" } }

(qemu) info block
virtio0 (hd1): hd1.qcow2 (qcow2)
    Cache mode:       writeback
    Backing file:     hd0.qcow2 (chain depth: 1)

Berto

  reply	other threads:[~2015-09-14 14:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 13:39 [Qemu-devel] [PATCH v3 0/4] Add 'blockdev-snapshot' command Alberto Garcia
2015-09-10 13:39 ` [Qemu-devel] [PATCH v3 1/4] block: rename BlockdevSnapshot to BlockdevSnapshotSync Alberto Garcia
2015-09-11 17:15   ` Max Reitz
2015-09-10 13:39 ` [Qemu-devel] [PATCH v3 2/4] block: Add 'ignore-backing' field to BlockdevOptionsGenericCOWFormat Alberto Garcia
2015-09-11 17:21   ` Max Reitz
2015-09-11 17:28     ` Kevin Wolf
2015-09-11 17:33       ` Max Reitz
2015-09-14  5:54         ` Alberto Garcia
2015-09-14  8:45           ` Kevin Wolf
2015-09-14 14:20             ` Alberto Garcia
2015-09-11 17:28   ` Eric Blake
2015-09-11 17:30     ` [Qemu-devel] [Qemu-block] " Eric Blake
2015-09-10 13:39 ` [Qemu-devel] [PATCH v3 3/4] block: add a 'blockdev-snapshot' QMP command Alberto Garcia
2015-09-11 17:58   ` Eric Blake
2015-09-14 14:08     ` Alberto Garcia [this message]
2015-09-11 18:11   ` Max Reitz
2015-09-10 13:39 ` [Qemu-devel] [PATCH v3 4/4] block: add tests for the 'blockdev-snapshot' command Alberto Garcia
2015-09-11 18:02   ` Eric Blake

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=w51lhc9gkl4.fsf@maestria.local.igalia.com \
    --to=berto@igalia.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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.