[libvirt] [PATCH 1/2] Storage: Suppress metadata refresh for volumes being built.

Ján Tomko jtomko at redhat.com
Tue May 5 08:22:17 UTC 2015


On Tue, May 05, 2015 at 08:43:21AM +0530, Prerna Saxena wrote:
> Libvirt periodically calls 'stat' on all volumes in a storage pool,
> to update fields such as 'target.allocation'.
> 
> The operation doesnt make sense for a volume which is curently being allocated.

From the comments in the storage driver, the point of allowing refresh
for a volume that is currently being allocated is to track the progress
of the allocation.

> Also, the 'target.allocation' sub-field is taken into account while copying a raw image.
> To suppress any (potential) corruption, libvirt must not attempt to refresh a volume currently being built.

What would be the corruption?

We do not allow using a volume that is currently building as a
source for cloning the volume - storageVolCreateXMLFrom checks for
origvol->building:

    if (origvol->building) {
        virReportError(VIR_ERR_OPERATION_INVALID,
                       _("volume '%s' is still being allocated."),
                       origvol->name);
        goto cleanup;
    }

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150505/5a0a96f6/attachment-0001.sig>


More information about the libvir-list mailing list