[libvirt] [PATCH libvirt] storage: add preallocation element

Marc-André Lureau marcandre.lureau at gmail.com
Thu May 17 22:59:12 UTC 2012


On Fri, May 18, 2012 at 12:13 AM, Eric Blake <eblake at redhat.com> wrote:
> Meta-question - is pre-allocation something that is persistent with the
> existence of the storage volume, or is it something that is one-shot at
> the creation of the volume?

>From what I gather, there doesn't seem to be any flag telling you if
the qcow2 was preallocated, although I guess there should be a way to
somehow guess that.

I think I understand your point, and you may be right that a flag at
creation time might be better. But, the fact that we can't easily know
from the img itself if it was preallocated is also a loss of
information. For example, if a user-friendly client wanted to warn the
user of potential slowness due to a qcow2 image created without
preallocation, it would be nice to keep that information somewhere, or
perhaps implement that "guessing" at the "qemu-img info" level. But if
we go that way, then why don't we query the image for all the data it
has instead of storing them in the XML, such as capacity? Isn't
allocation also a creation-time only value?


-- 
Marc-André Lureau




More information about the libvir-list mailing list