Change in vdsm[ovirt-3.5]: Live Merge: Skip initial extension when base is raw

alitke at redhat.com alitke at redhat.com
Thu Feb 4 20:53:56 UTC 2016


Adam Litke has uploaded a new change for review.

Change subject: Live Merge: Skip initial extension when base is raw
......................................................................

Live Merge: Skip initial extension when base is raw

When starting a live merge we pre-extend the base volume in order to
accomodate the data that will be merged into the base volume.  This is
only necessary for thinly provisioned block volumes.  Check to make sure
that the base volume is eligible for extension before extending it.

Change-Id: If105854174e9fdbc9bad7aef511ff233de8991a3
Signed-off-by: Adam Litke <alitke at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/10/53110/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index f6ba328..2c577e3 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -5966,6 +5966,7 @@
             self.log.error("merge: Refusing to merge into a shared volume")
             return errCode['mergeErr']
         baseSize = int(res['info']['apparentsize'])
+        baseFormat = res['info']['format']
 
         # Indicate that we expect libvirt to maintain the relative paths of
         # backing files.  This is necessary to ensure that a volume chain is
@@ -6031,7 +6032,9 @@
         capacity, alloc, physical = self._dom.blockInfo(drive.path, 0)
         maxAlloc = min(capacity, maxAlloc)
         maxAlloc = maxAlloc * drive.VOLWM_COW_OVERHEAD
-        self.extendDriveVolume(drive, baseVolUUID, maxAlloc)
+
+        if drive.blockDev and baseFormat != 'RAW':
+            self.extendDriveVolume(drive, baseVolUUID, maxAlloc)
 
         # Trigger the collection of stats before returning so that callers
         # of getVmStats after this returns will see the new job


-- 
To view, visit https://gerrit.ovirt.org/53110
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If105854174e9fdbc9bad7aef511ff233de8991a3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Adam Litke <alitke at redhat.com>


More information about the vdsm-patches mailing list