qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Ian Main <imain@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	dietmar@proxmox.com
Subject: Re: [Qemu-devel] [PATCH] qmp: add 'drive' to enum NewImageMode
Date: Tue, 18 Jun 2013 13:33:29 +0200	[thread overview]
Message-ID: <20130618113329.GH7649@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1371451486-28929-1-git-send-email-famz@redhat.com>

On Mon, Jun 17, 2013 at 02:44:46PM +0800, Fam Zheng wrote:
> Introduce a "drive" option to new image mode. With this mode, QMP command
> should (this patch only modified drive-backup to support it, and report invalid
> parameter error for drive-mirror) skip creating the image file or trying to
> open it, it should just reuse the existing BDS by looking for the named drive
> with bdrv_find(). It will be useful to utilize "none" sync mode of drive-backup
> for point-in-time snapshot.
> 
> The example with drive-backup is:
> 
>     -> { "execute": "drive-backup", "arguments": { "device": "ide0-hd0",
>                                                    "mode": "drive",
>                                                    "target": "drive_id_here" } }
>     <- { "return": {} }
> 
> 
> Target bs is not released when block job completes in this case since it's
> still used as a device drive or exported by nbd server.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  block/backup.c            |  9 ++++++--
>  blockdev.c                | 57 ++++++++++++++++++++++++++++++++---------------
>  include/block/block_int.h |  3 ++-
>  qapi-schema.json          |  4 +++-
>  4 files changed, 51 insertions(+), 22 deletions(-)

Fam and I chatted about this yesterday.  The QMP API change here is that
traditionally 'target' and 'mode' always referred to existing filenames.
Now you can set 'mode': 'drive' and then 'target' becomes a QEMU block
device name.

I think this API extension is reasonable but I think we haven't nailed
down the lifecycle of the snapshot block drive yet...

Stefan

      reply	other threads:[~2013-06-18 11:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17  6:44 [Qemu-devel] [PATCH] qmp: add 'drive' to enum NewImageMode Fam Zheng
2013-06-18 11:33 ` Stefan Hajnoczi [this message]

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=20130618113329.GH7649@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=dietmar@proxmox.com \
    --cc=famz@redhat.com \
    --cc=imain@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).