Re: [PATCH v1 1/2] storage: extend preallocation flags support for qemu-img

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 4 Apr 2018 13:31:39 +0200
Michal Privoznik <mprivozn@xxxxxxxxxx> wrote:

> On 04/03/2018 04:14 PM, Wim Ten Have wrote:
> > From: Wim ten Have <wim.ten.have@xxxxxxxxxx>
> > 
> > This patch adds support to qcow2 formatted filesystem object storage by
> > instructing qemu-img to build them with preallocation=falloc whenever the
> > XML described storage <allocation> matches its <capacity>.  For all other
> > cases the filesystem stored objects are built with preallocation=metadata.
> > 
> > Signed-off-by: Wim ten Have <wim.ten.have@xxxxxxxxxx>
	...
> >      VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA = 1 << 0,
> > -    VIR_STORAGE_VOL_CREATE_REFLINK = 1 << 1, /* perform a btrfs lightweight copy */
> > +    VIR_STORAGE_VOL_CREATE_PREALLOC_FALLOC   = 1 << 1,
> > +    VIR_STORAGE_VOL_CREATE_PREALLOC_FULL     = 1 << 2,
> > +    VIR_STORAGE_VOL_CREATE_REFLINK           = 1 << 3, /* perform a btrfs lightweight copy */  
> 
> This is not. Imagine there's a mgmt application already written and
> compiled which calls:
> 
> virStorageVolCreateXML(flags = VIR_STORAGE_VOL_CREATE_REFLINK);
> 
> Because it is already compiled it is effectively calling:
> 
> virStorageVolCreateXML(flags = 1);
> 
> and everything works. However, if this change would be merged, the mgmt
> application would be still making the same call but now it would have
> different semantic, because you are changing the numbering. So
> effectively mgmt app would be calling
> 
> virStorageVolCreateXML(flags = VIR_STORAGE_VOL_CREATE_PREALLOC_FALLOC)
> 
> which is obviously wrong. We can not expect mgmt applications to be
> recompiled every time there's a new release of libvirt.
	...

  right, let me send v2. (applying and propagating XML target.sparse)

> Also, storagevolxml2argvtest is failing after this change. See 'make check'.

  ?! ... sure I ran 'make check'.  Anyways ... corrections under v2 coming forth.

Rgds,
- Wim.

> Michal
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux