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

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

 



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@xxxxxxxxxx>
---
 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(-)

diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c
index 70b73e87ec..66bd4bcba7 100644
--- a/src/conf/virdomainobjlist.c
+++ b/src/conf/virdomainobjlist.c
@@ -46,11 +46,11 @@ struct _virDomainObjList {
     virObjectRWLockable parent;
 
     /* uuid string -> virDomainObj  mapping
-     * for O(1), lockless lookup-by-uuid */
+     * for O(1), lookup-by-uuid */
     GHashTable *objs;
 
     /* name -> virDomainObj mapping for O(1),
-     * lockless lookup-by-name */
+     * lookup-by-name */
     GHashTable *objsName;
 };
 
diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c
index 62b21b5e5f..95279d5b1c 100644
--- a/src/conf/virinterfaceobj.c
+++ b/src/conf/virinterfaceobj.c
@@ -44,7 +44,7 @@ struct _virInterfaceObjList {
     virObjectRWLockable parent;
 
     /* name string -> virInterfaceObj  mapping
-     * for O(1), lockless lookup-by-name */
+     * for O(1), lookup-by-name */
     GHashTable *objsName;
 };
 
diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index ba84dce82b..fd23ea5fc7 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -48,7 +48,7 @@ struct _virNodeDeviceObjList {
     virObjectRWLockable parent;
 
     /* name string -> virNodeDeviceObj mapping
-     * for O(1), lockless lookup-by-name */
+     * for O(1), lookup-by-name */
     GHashTable *objs;
 
 };
diff --git a/src/conf/virnwfilterbindingobjlist.c b/src/conf/virnwfilterbindingobjlist.c
index 03441c9c1b..53713d815a 100644
--- a/src/conf/virnwfilterbindingobjlist.c
+++ b/src/conf/virnwfilterbindingobjlist.c
@@ -39,7 +39,7 @@ struct _virNWFilterBindingObjList {
     virObjectRWLockable parent;
 
     /* port dev name -> virNWFilterBindingObj  mapping
-     * for O(1), lockless lookup-by-port dev */
+     * for O(1), lookup-by-port dev */
     GHashTable *objs;
 };
 
diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c
index ed62856d61..92985c4b63 100644
--- a/src/conf/virsecretobj.c
+++ b/src/conf/virsecretobj.c
@@ -54,7 +54,7 @@ struct _virSecretObjList {
     virObjectRWLockable parent;
 
     /* uuid string -> virSecretObj  mapping
-     * for O(1), lockless lookup-by-uuid */
+     * for O(1), lookup-by-uuid */
     GHashTable *objs;
 };
 
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index d527132184..b57c1cb8b2 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -66,15 +66,15 @@ struct _virStorageVolObjList {
     virObjectRWLockable parent;
 
     /* key string -> virStorageVolObj mapping
-     * for (1), lockless lookup-by-key */
+     * for (1), lookup-by-key */
     GHashTable *objsKey;
 
     /* name string -> virStorageVolObj mapping
-     * for (1), lockless lookup-by-name */
+     * for (1), lookup-by-name */
     GHashTable *objsName;
 
     /* path string -> virStorageVolObj mapping
-     * for (1), lockless lookup-by-path */
+     * for (1), lookup-by-path */
     GHashTable *objsPath;
 };
 
@@ -98,11 +98,11 @@ struct _virStoragePoolObjList {
     virObjectRWLockable parent;
 
     /* uuid string -> virStoragePoolObj mapping
-     * for (1), lockless lookup-by-uuid */
+     * for (1), lookup-by-uuid */
     GHashTable *objs;
 
     /* name string -> virStoragePoolObj mapping
-     * for (1), lockless lookup-by-name */
+     * for (1), lookup-by-name */
     GHashTable *objsName;
 };
 
-- 
2.35.1




[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