]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Remove rwlocks during virStoragePoolObjListForEach
authorJohn Ferlan <jferlan@redhat.com>
Thu, 24 May 2018 19:38:18 +0000 (15:38 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 29 May 2018 12:36:30 +0000 (08:36 -0400)
commitff57a713a4ff4e3d040b8b6a26e7214bfcde4527
tree821de15987a3f53ab3e23f7036bea1af644b6b80
parent1bbb5dddbb7dc97ff15317f00d0935875463428c
storage: Remove rwlocks during virStoragePoolObjListForEach

Remove the locks since they are unnecessary and would cause
a hang for a driver reload/restart when a transient pool was
previously active as a result of the call:

virStoragePoolUpdateInactive:
...
    if (!virStoragePoolObjGetConfigFile(obj)) {
        virStoragePoolObjRemove(driver->pools, obj);
...

stack trace:

Thread 17 (Thread 0x7fffcc574700 (LWP 12465)):
...pthread_rwlock_wrlock
...virRWLockWrite
...virObjectRWLockWrite
...virStoragePoolObjRemove
...virStoragePoolUpdateInactive
...storagePoolUpdateStateCallback
...virStoragePoolObjListForEachCb
...virHashForEach
...virStoragePoolObjListForEach
...storagePoolUpdateAllState
...storageStateInitialize
...virStateInitialize
...daemonRunStateInit
...virThreadHelper
...start_thread
...clone

Introduced by commit id 4b2e0ed6e3.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/virstorageobj.c