Re: [PATCH 01/11] qemu: extract helper to get the current balloon

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

 



On 09/03/2014 12:41 AM, Francesco Romani wrote:

>>
>> [3] Ouch.  This function is unlocking vm, even though it did not obtain
>> the lock.  Which it kind of has to do because of the way that
>> qemuDomainObjEndJob may end up invalidating vm.  While transfer
>> semantics are workable, they require good comments at the start of the
>> function, and making sure that the caller doesn't duplicate the efforts,
>> nor forget anything else.
> 
> Will add comment documenting this. Is this sufficient or there is something
> better I could do?

A comment is sufficient.  Here's a similar comment I'm adding in my
series for virDomainBlockCopy:

/* bandwidth in bytes/s.  Caller must lock vm beforehand, and not
 * access it afterwards.  */
static int
qemuDomainBlockCopyCommon(virDomainObjPtr vm,
                          virConnectPtr conn,
                          const char *path,
                          virStorageSourcePtr dest,
                          unsigned long long bandwidth,
                          unsigned int flags)


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