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

Re: [libvirt] [PATCH 1/7] util: Alter virObjectLockRead to return status




On 07/28/2017 12:56 PM, Pavel Hrdina wrote:
> On Fri, Jul 28, 2017 at 12:38:55PM -0400, John Ferlan wrote:
>> Rather than ignore errors, let's have virObjectLockRead check for
>> the correct usage and issue an error when not properly used so
>> so that we don't run into situations where the resource we think
>> we're locking really isn't locked because the void input parameter
>> wasn't valid.
> 
> I agree with Dan that this doesn't give any benefit.  We should rather
> consider start using abort() since this is a programming error, not
> something that depends on an input from user.  It should not happen if
> if it does we have serious issues and abort is a best choice.
> 
> Pavel
> 

I'm in the minority, but that's fine. I could also change this patch to
be rename virObjectLockRead to be virObjectRWLockRead as suggested later
on too.

John


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