From: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Alex Bligh <alex@alex.org.uk>
Subject: Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-'
Date: Mon, 15 Oct 2012 12:11:02 -0600 [thread overview]
Message-ID: <507C51B6.1010803@redhat.com> (raw)
In-Reply-To: <507C50E9.1050706@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]
On 10/15/2012 12:07 PM, Eric Blake wrote:
> On 10/15/2012 11:29 AM, Alex Bligh wrote:
>> This patch allows qemu-img rebase to rebase an image to
>> have no backing file, as opposed to merely allowing it to
>> rebase to an existing backing file.
>
> You can already do that by rebasing to the empty string. And it is
> feasible (although unlikely) to have a file named '-', where your patch
> would make it impossible to use that file directly (although you could
> still use './-'). NACK.
>
> $ qemu-img info bar
> image: bar
> file format: qcow2
> virtual size: 0 (0 bytes)
> disk size: 192K
> cluster_size: 65536
> backing file: foo
> $ qemu-img rebase -u -b '' bar
> $ qemu-img info bar
> image: bar
> file format: qcow2
> virtual size: 0 (0 bytes)
> disk size: 192K
> cluster_size: 65536
On the other hand, if you don't use -u, then qemu-img complains:
$ qemu-img rebase -b '' bar
qemu-img: Could not open new backing file ''
So I think a better patch would be to allow rebase-by-pull to work the
same as unsafe rebase, by honoring the empty string as a request to pull
the entire chain into the destination and leave no backing file.
--
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 18:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 17:29 [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-' Alex Bligh
2012-10-15 18:07 ` Eric Blake
2012-10-15 18:11 ` Eric Blake [this message]
2012-10-15 18:42 ` Alex Bligh
2012-10-15 19:28 ` Eric Blake
2012-10-15 20:28 ` Alex Bligh
2012-10-23 16:41 ` Christoph Hellwig
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=507C51B6.1010803@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 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.