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 ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature