[NEW PATCH] BZ#705058 - StoragePool instanciations should be lock protected. (via gerrit-bot)

Dan Kenigsberg danken at redhat.com
Sun Jul 17 14:21:53 UTC 2011


New patch submitted by Dan Kenigsberg (danken at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/700

commit a29fe2be18fac53884addecd925a9cc9637633df
Author: Yotam Oron <yoron at redhat.com>
Date:   Wed Jul 13 11:56:06 2011 +0300

    BZ#705058 - StoragePool instanciations should be lock protected.
    
    Add a storage shared lock on the call to _restorePool, since creates a
    new pool object
    
    Change-Id: I4ad3cdb07299d63203db98ae3223559b6fdc4eab

diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index ccf93d5..a6de936 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -166,6 +166,7 @@ class HSM:
             for spUUID in dirList:
                 poolPath = os.path.join(self.storage_repository, spUUID)
                 try:
+                    vars.task.getSharedLock(STORAGE, spUUID)
                     if os.path.exists(poolPath):
                         self._restorePool(spUUID)
                         #TODO Once we support simultaneous connection to multiple pools, remove following line (break)




More information about the vdsm-patches mailing list