[PATCH] conf: remove misleading comments about access being 'lockless'

Ján Tomko jtomko at redhat.com
Thu Mar 10 07:27:48 UTC 2022


On a Wednesday in 2022, Daniel P. Berrangé wrote:
>For the various structs storing lists of objects, the access
>to the hash tables is not lockless. The mutex on the object
>owning the hash table must be held.
>
>Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
>---
> src/conf/virdomainobjlist.c          |  4 ++--
> src/conf/virinterfaceobj.c           |  2 +-
> src/conf/virnodedeviceobj.c          |  2 +-
> src/conf/virnwfilterbindingobjlist.c |  2 +-
> src/conf/virsecretobj.c              |  2 +-
> src/conf/virstorageobj.c             | 10 +++++-----
> 6 files changed, 11 insertions(+), 11 deletions(-)
>

The confusing terminology seems to originate in
commit a3adcce79568873bbaac76c4a5098b6721702b21

     Convert virDomainObjListPtr to use a hash of domain objects

which removed the need to lock every object when searching,
but the hash table was still protected by the driver lock at the time.

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220310/f0341f40/attachment.sig>


More information about the libvir-list mailing list