From: Eric Blake <eblake@redhat.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-img rebase: allow empty file name as new backing file to mean rebase with no backing file [attempt 2]
Date: Mon, 15 Oct 2012 14:44:59 -0600 [thread overview]
Message-ID: <507C75CB.2090006@redhat.com> (raw)
In-Reply-To: <1350332607-31177-1-git-send-email-alex@alex.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
On 10/15/2012 02:23 PM, Alex Bligh wrote:
Rather long on the subject line; 'git shortlog -30' will give you a
taste for typical commit summary length. Also, you will usually see
[PATCHv2] as the prefix, rather than [PATCH]...[attempt 2] as a suffix,
since 'git am' only strips a [] prefix. It might be better as:
qemu-img rebase: use empty string to rebase without backing file
> This patch allows an empty filename to be passed as the new base image name
> for qemu-img rebase to mean base the image on no backing file (i.e.
> independent of any backing file). According to Eric Blake, qemu-imag rebase
s/qemu-imag/qemu-img/
> already supports this when '-u' is used; this adds support when -u is not
> used.
>
> Signed-off-by: Alex Bligh <alex@alex.org.uk>
> ---
> @@ -1675,7 +1677,11 @@ static int img_rebase(int argc, char **argv)
> * backing file are overwritten in the COW file now, so the visible content
> * doesn't change when we switch the backing file.
> */
> - ret = bdrv_change_backing_file(bs, out_baseimg, out_basefmt);
> + if (bs_new_backing)
> + ret = bdrv_change_backing_file(bs, out_baseimg, out_basefmt);
> + else
> + ret = bdrv_change_backing_file(bs, NULL, NULL);
Should we error out if the user specifies basefmt but gives the empty
string, instead of silently ignoring the bogus basefmt? But that's
bikeshedding, I can live with what you wrote.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
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: 617 bytes --]
next prev parent reply other threads:[~2012-10-15 20:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 20:23 [Qemu-devel] [PATCH] qemu-img rebase: allow empty file name as new backing file to mean rebase with no backing file [attempt 2] Alex Bligh
2012-10-15 20:44 ` Eric Blake [this message]
2012-10-15 20:51 ` Alex Bligh
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=507C75CB.2090006@redhat.com \
--to=eblake@redhat.com \
--cc=alex@alex.org.uk \
--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).