qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Jeff Cody <jcody@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v8 for 2.1 4/4] block: add QAPI command to allow live backing file change
Date: Tue, 01 Jul 2014 08:43:57 -0600	[thread overview]
Message-ID: <53B2C92D.9010307@redhat.com> (raw)
In-Reply-To: <1404201136-30412-1-git-send-email-stefanha@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2915 bytes --]

On 07/01/2014 01:52 AM, Stefan Hajnoczi wrote:
> From: Jeff Cody <jcody@redhat.com>
> 
> This allows a user to make a live change to the backing file recorded in
> an open image.
> 
> The image file to modify can be specified 2 ways:
> 
> 1) image filename
> 2) image node-name
> 

This part of the commit message is now stale, but that's okay...

> Note: this does not cause the backing file itself to be reopened; it
> merely changes the backing filename in the image file structure, and
> in internal BDS structures.
> 
> It is the responsibility of the user to pass a filename string that
> can be resolved when the image chain is reopened, and the filename
> string is not validated.
> 
> A good analogy for this command is that it is a live version of
> 'qemu-img rebase -u', with respect to changing the backing file string.
> 
> [Jeff is offline so I respun this patch in his absence.  Dropped image
> filename since using node-name is preferred and this is a new command.
> No need to introduce the limitations of finding images by filename.
> --Stefan]

...given that you are preserving history while documenting changes.

> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

This is a big enough change that I re-reviewed the patch.  The reduced
capability of the command is not an issue for how libvirt plans to use
it (mainly as a witness that libvirt has control over backing file
strings); and it is still desirable from libvirt's point of view to
introduce the command.

Thanks for fixing this up.

> ---
>  blockdev.c           | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  qapi/block-core.json | 26 +++++++++++++++++
>  qmp-commands.hx      | 39 ++++++++++++++++++++++++++
>  3 files changed, 144 insertions(+)
> 


> +SQMP
> +change-backing-file
> +-------------------
> +Since: 2.1
> +
> +Change the backing file in the image file metadata.  This does not cause
> +QEMU to reopen the image file to reparse the backing filename (it may,
> +however, perform a reopen to change permissions from r/o -> r/w -> r/o,
> +if needed). The new backing file string is written into the image file
> +metadata, and the QEMU internal strings are updated.
> +
> +Arguments:
> +
> +- "image-node-name":    The name of the block driver state node of the
> +                        image to modify.  The "device" is argument is used to
> +                        verify "image-node-name" is in the chain described by
> +                        "device".
> +                        (json-string, optional)

No longer optional.  If you still have time to fix it, great; if not,
it's minor enough.  My R-b still stands.
-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      parent reply	other threads:[~2014-07-01 14:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 19:40 [Qemu-devel] [PATCH v7 for 2.1 0/4] Allow custom backing-file string in commit/stream Jeff Cody
2014-06-25 19:40 ` [Qemu-devel] [PATCH v7 for 2.1 1/4] block: add helper function to determine if a BDS is in a chain Jeff Cody
2014-06-30 14:55   ` Kevin Wolf
2014-06-25 19:40 ` [Qemu-devel] [PATCH v7 for 2.1 2/4] block: extend block-commit to accept a string for the backing file Jeff Cody
2014-06-30 14:55   ` Kevin Wolf
2014-06-25 19:40 ` [Qemu-devel] [PATCH v7 for 2.1 3/4] block: add backing-file option to block-stream Jeff Cody
2014-06-25 19:40 ` [Qemu-devel] [PATCH v7 for 2.1 4/4] block: add QAPI command to allow live backing file change Jeff Cody
2014-06-25 19:52   ` Eric Blake
2014-06-25 19:56     ` Jeff Cody
2014-06-30 14:59   ` Kevin Wolf
2014-06-30 15:55     ` Eric Blake
2014-07-01  7:52   ` [Qemu-devel] [PATCH v8 " Stefan Hajnoczi
2014-07-01  8:20     ` Kevin Wolf
2014-07-01 14:43     ` Eric Blake [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=53B2C92D.9010307@redhat.com \
    --to=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --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 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).