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

Eric Blake eblake at redhat.com
Wed Sep 3 11:54:08 UTC 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140903/13d4419c/attachment-0001.sig>


More information about the libvir-list mailing list