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

Re: [libvirt] [PATCH] API: Improve log for domain related APIs



On 12/23/2010 11:00 AM, Dave Allan wrote:
>>>  virConnectPtr
>>>  virDomainGetConnect (virDomainPtr dom)
>>>  {
>>> -    DEBUG("dom=%p", dom);
>>> +    const char *name = virDomainGetName(dom);
>>> +
>>> +    DEBUG("dom=%p, (VM: %s)", dom, name);
>>
>> virDomainGetName() can return NULL, so you'd need to use NULLSTR(name)
>> everywhere.  That alone requires a v2, but I'd wait for feedback from
>> danpb or DV as to whether this makes sense.
> 
> Whether what makes sense?

Do we risk any deadlocks by calling a public API (virDomainGetName) from
within the body of another public API (such as virDomainGetConnect)?  If
there is any risk, then the extra debug information is not worth it.
But if it's always safe to do, then I like the idea of the extra
information, even though it adds a slight amount of time to execute each
domain-related API.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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