Re: [libvirt PATCH 6/7] virMutex*: Warn on error

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

 



On Thu, Aug 05, 2021 at 16:11:15 +0100, Daniel P. Berrangé wrote:
> On Thu, Aug 05, 2021 at 02:58:03PM +0100, Daniel P. Berrangé wrote:
> > On Thu, Aug 05, 2021 at 03:33:57PM +0200, Tim Wiederhake wrote:
> > > On Thu, 2021-08-05 at 14:24 +0100, Daniel P. Berrangé wrote:
> > > > On Thu, Aug 05, 2021 at 03:08:50PM +0200, Tim Wiederhake wrote:

[...]

> The pthread_mutex_destroy call is the only one that I see
> returning errors with PTHREAD_MUTEX_NORMAL. So I don't think
> there's benefit to adding the code to lock/unlock paths.

And as noted I'd be very careful with that one too. I've got at least
one counterexample of a code path which effectively does the same on a
very common code path.

Namely 'virDomainObjParseXML' uses:

g_autoptr(virDomainObj) obj = NULL;

and then returns directly on common failures such as XML parsing errors,
post-parse callback errors or even errors from the validation callbacks.

Spamming logs in such a common code path is definitely not acceptable.





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

  Powered by Linux