Re: [PATCH v2] Block info query: Add check for transient domain

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

 



On 01/23/2014 07:57 PM, John Ferlan wrote:
> Currently the qemuDomainGetBlockInfo will return allocation == physical
> for most backing stores. For a qcow2 block backed device it's possible
> to return the highest lv extent allocated from qemu for an active guest.
> That is a value where allocation != physical and one would hope be less.
> However, if the guest is not running, then the code falls back to returning
> allocation == physical. This turns out to be problematic for rhev which
> monitors the size of the backing store. During a migration, before the
> VM has been started on the target and while it is deemed inactive on the
> source, there's a small window of time where the allocation is returned
> as physical triggering the code to extend the file unnecessarily.
> 
> Since rhev uses transient domains and this is edge condition for a transient
> domain, rather than returning good status and allocation == physical when
> this "window of opportunity" exists, this patch will check for a transient
> (or non persistent) domain and return a failure to the caller rather than
> returning the defaults. For a persistent domain, the defaults will be
> returned. The description for the virDomainGetBlockInfo has been updated
> to describe the phenomena.
> 

> @@ -10300,6 +10310,15 @@ cleanup:
>      VIR_FREE(alias);
>      virStorageFileFreeMetadata(meta);
>      VIR_FORCE_CLOSE(fd);
> +
> +    /* If we failed to get data from a domain because it's inactive and
> +     * it's not a persisent domain, then force failure.

s/persisent/persistent/

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]