Re: [PATCH 10/14] Introduce virDomainMigrate*CompressionCache APIs

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

 



On Fri, Feb 22, 2013 at 09:06:42 +0100, Peter Krempa wrote:
> On 02/19/13 13:35, Jiri Denemark wrote:
> > Introduce virDomainMigrateGetCompressionCache and
> > virDomainMigrateSetCompressionCache APIs.
> > ---
> > +virDomainMigrateGetCompressionCache(virDomainPtr domain,
> > +                                    unsigned long long *cacheSize,
> > +                                    unsigned int flags)
> > +{
> > +    virConnectPtr conn;
> > +
> > +    VIR_DOMAIN_DEBUG(domain, "cacheSize=%p, flags=%x", cacheSize, flags);
> > +
> > +    virResetLastError();
> > +
> > +    if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
> > +        virLibDomainError(VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
> > +        virDispatchError(NULL);
> > +        return -1;
> > +    }
> > +
> > +    conn = domain->conn;
> > +
> > +    virCheckNonNullArgGoto(cacheSize, error);
> > +
> > +    if (conn->flags & VIR_CONNECT_RO) {
> > +        virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
> 
> IMHO the *get* function could be allowed to work on RO connections.

Yeah, I actually copied this from virDomainMigrateGetMaxSpeed, which
means it could be fixed too.

Jirka

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