[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be speci
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-' |
Date: |
Mon, 15 Oct 2012 12:11:02 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0 |
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 address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature