Change in vdsm[master]: [WIP] Reduce the number of pvs calls using lvm.checkpvsblksi...

ewarszaw at redhat.com ewarszaw at redhat.com
Mon Feb 4 14:29:39 UTC 2013


Eduardo has uploaded a new change for review.

Change subject: [WIP] Reduce the number of pvs calls using lvm.checkpvsblksize()
......................................................................

[WIP] Reduce the number of pvs calls using lvm.checkpvsblksize()

Change-Id: I778a22843392f2b1345718b3c02bd2f12200056b
Signed-off-by: Eduardo <ewarszaw at redhat.com>
---
M vdsm/storage/blockSD.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/11692/1

diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index aa4059a..6a02f5a 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -503,10 +503,12 @@
         except se.LogicalVolumeDoesNotExistError:
             pass
 
-        numOfPVs = len(lvm.listPVNames(vgName))
+        pvs = lvm.listPVNames(vgName)
+        numOfPVs = len(pvs)
         if version in VERS_METADATA_LV and numOfPVs > MAX_PVS:
             cls.log.debug("%d > %d", numOfPVs, MAX_PVS)
             raise se.StorageDomainIsMadeFromTooManyPVs()
+        logBlkSize, phyBlkSize = lvm.checkpvsblksize(pvs)
 
         # Create metadata service volume
         metasize = metaSize(vgName)
@@ -548,8 +550,6 @@
             md = LvBasedSDMetadata(vgName, sd.METADATA)
         elif version in VERS_METADATA_TAG:
             md = TagBasedSDMetadata(vgName)
-
-        logBlkSize, phyBlkSize = lvm.getVGBlockSizes(vgName)
 
         # create domain metadata
         # FIXME : This is 99% like the metadata in file SD


--
To view, visit http://gerrit.ovirt.org/11692
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I778a22843392f2b1345718b3c02bd2f12200056b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw at redhat.com>


More information about the vdsm-patches mailing list