On Mon, Mar 04, 2013 at 04:05:50PM +0100, Kevin Wolf wrote:
Am 04.03.2013 um 15:46 hat Daniel P. Berrange geschrieben:
> On Mon, Mar 04, 2013 at 03:38:54PM +0100, Kevin Wolf wrote:
> > Am 04.03.2013 um 15:27 hat Daniel P. Berrange geschrieben:
> > > On Mon, Mar 04, 2013 at 03:04:53PM +0100, Kevin Wolf wrote:
> > > > Am 04.03.2013 um 14:09 hat Daniel P. Berrange geschrieben:
> > > > I think it makes much more sense to deal with it the way qemu does
> > > > instead of inventing new names. This has much more of an
(incompatible)
> > > > feature flag than of a different image format. So to fit it in your
> > > > proposed syntax:
> > >
> > > The issue is that QEMU is not the only thing that implements the qcow
> > > format. There are a number of other impls out there, and we can't
just
> > > assume that they will all be providing a qcow2 driver that automagically
> > > opens a qcow3 image format. Just in the same way we didn't assume
that
> > > a 'qcow' (version 1) driver would open a version 2 image.
> >
> > That's true. Other implementation actually tend to have a 'qcow'
driver
> > that deals with both qcow1 and qcow2. But these two are actually
> > different enough that calling them two different formats might be
> > acceptable.
> >
> > In contrast, version 3 images share _exactly_ the same structure with
> > version 2 images, the just have additional header fields and support
> > some new flags in some structures (that were previously reserved).
> >
> > If you call this a different image format, then scratch that whole
> > <feature> idea, because then each newly added feature is a new image
> > format by your standards.
>
> No, that's not what I'm saying. The version 3 image format introduces
> the ability to set a variety of features in an extensible way. Adding
> new features to that list doesn't mean the version has changed.
Why does libvirt care whether a new feature is indicated by incrementing
one header field or by setting a bit in a different header field? These
are image format internals, not external interfaces.
> > > It so happens that with QEMU if you specify format=qcow2 and give it
> > > a qcow3 image, QEMU will open it, but libvirt can't assume that,
since
> > > this is a mere implementation detail. Hence libvirt must explicitly
> > > refer to 'qcow3' in the XML and map it to qcow2 if applicable
when
> > > talking to QEMU.
> >
> > If you need this information, sure, save it. I'm just requesting that
> > you don't abuse the format name for it.
>
> The key distinction is that libvirt XML is recording an generic image
> format, while the QEMU cli args are referring to a specific driver
> implementation, which are support multiple formats. Typically these
> map 1-to-1, but there's no such requirement in general. Hence will
> refer to 'qcow3' in all its XML descriptions, and map to 'qcow2'
when
> talking to QEMU, or even just to 'qcow' if talking to a different impl
> which supports all 3 versions in one driver.
I'm not talking about the QEMU cli, but about qcow2 as the format as
defined in the spec (which just happens to sit in qemu.git, but isn't
qemu specific at all)
So you're saying that you consider the format name to be "qcow2" regardless
of whether the version numer field is specified as 2 or 3.
So in other words, if an application came along and required libvirt to
set format=qcow3 on its CLI, we could justifiably refuse to do that in
libvirt claiming this is not in compliance with the spec ? This is my
big concern. If we go with 'format=qcow2' in the XML and we did ever
hit a case where we needed to distinguish versions, we'd not have enough
info in the XML todo that. If you are willing so that that such a scenario
is not spec compliant, then I'll be ok using just qcow2 in the libvirt XML
for this.
It would be nice if the spec explicitly stated that the format should be
referred to by any implementation as 'qcow2' regardles of version number
being 2 or 3.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|