Change in vdsm[ovirt-3.5]: Live Merge: Fix pre-extension calculation for chunked drives

nsoffer at redhat.com nsoffer at redhat.com
Thu Oct 22 19:20:18 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: Live Merge: Fix pre-extension calculation for chunked drives
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/47589/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 5931:         # the worst case, the allocated size of 'base' should be increased by
Line 5932:         # the allocated size of 'top' plus one additional chunk to accomodate
Line 5933:         # additional writes to 'top' during the live merge operation.
Line 5934:         maxAlloc = baseSize + topSize
Line 5935:         self.extendDriveVolume(drive, baseVolUUID, maxAlloc)
In 3.5 there is no protection from extending behind the virtual size:

    def getNextVolumeSize(self, curSize):
        """
        Returns the next volume size in megabytes. This value is based on the
        volExtensionChunk property and it's the size that should be requested
        for the next LV extension.  curSize is the current size of the volume
        to be extended.  For the leaf volume curSize == self.apparentsize.
        For internal volumes it is discovered by calling irs.getVolumeSize().
        """
        nextSize = (self.volExtensionChunk +
                    ((curSize + constants.MEGAB - 1) / constants.MEGAB))
        return min(nextSize, self.truesize)                                                                                                                                     

self.truesize is in bytes, and is the current size of the block device, not the
virtual size.

So we should either backport the fix from master. This may be hard since it as part of major refactoring for lsm on mixed domains.

Any without this, we are risking extending too much.
Line 5936: 
Line 5937:         # Trigger the collection of stats before returning so that callers
Line 5938:         # of getVmStats after this returns will see the new job
Line 5939:         self._vmStats.sampleVmJobs()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I959608dc2f5a71afca605610267478e8a16e2c4b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list