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 <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to