[NEW PATCH] BZ#704131 - Activate all image volumes at once. (via gerrit-bot)

Eduardo Warszawski ewarszaw at redhat.com
Sun Aug 7 14:46:54 UTC 2011


New patch submitted by Eduardo Warszawski (ewarszaw at redhat.com)

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

commit 9c416c350bc9977b715562cd0d7c01ad117d2284
Author: Eduardo Warszawski <ewarszaw at redhat.com>
Date:   Mon Aug 1 20:56:25 2011 +0300

    BZ#704131 - Activate all image volumes at once.
    
    Required for performance reasons if the image is deep.
    Candidate to the Ugly Patch of the Month.
    
    Change-Id: I8423260ca92eb522239064403d3833002e048375

diff --git a/vdsm/storage/resourceFactories.py b/vdsm/storage/resourceFactories.py
index 0948084..0b4dc92 100644
--- a/vdsm/storage/resourceFactories.py
+++ b/vdsm/storage/resourceFactories.py
@@ -100,7 +100,7 @@ class ImageResourceFactory(rm.SimpleResourceFactory):
 
     def __getResourceCandidatesList(self, resourceName, lockType):
         """
-        Return list of lock candidates (tempalte and volumes)
+        Return list of lock candidates (template and volumes)
         """
         volResourcesList = []
         template = None
@@ -126,6 +126,14 @@ class ImageResourceFactory(rm.SimpleResourceFactory):
         volUUIDChain = [vol.volUUID for vol in chain]
         volUUIDChain.sort()
 
+        # Activate all volumes in chain at once.
+        # We will attempt to activate all volumes again down to the flow with
+        # no consequence, since they are already active.
+        # TODO Fix resource framework to hold images, instead of specific vols.
+        # This assumes that chains can not spread into more than one SD.
+        if dom.__class__.__name__ == "BlockStorageDomain":
+            lvm.activateLVs(self.sdUUID, volUUIDChain)
+
         e = None
         # Acquire template locks:
         # - 'lockType' for template's image itself




More information about the vdsm-patches mailing list