Eduardo has uploaded a new change for review.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Rename *Volume.extend method to *Volume.enlarge
Change-Id: Id7b88067fa3fe2c19faab31d0c882b4494f0bc12 Signed-off-by: Eduardo ewarszaw@redhat.com --- M vdsm/storage/blockVolume.py M vdsm/storage/image.py M vdsm/storage/sp.py M vdsm/storage/volume.py 4 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/17802/1
diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py index effd3a5..5a99333 100644 --- a/vdsm/storage/blockVolume.py +++ b/vdsm/storage/blockVolume.py @@ -284,7 +284,7 @@
raise eFound
- def extend(self, newSize): + def enlarge(self, newSize): """Extend a logical volume 'newSize' - new size in blocks """ diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py index e3414b4..eb37f09 100644 --- a/vdsm/storage/image.py +++ b/vdsm/storage/image.py @@ -394,7 +394,7 @@ volUUID=srcVol.volUUID)
# Extend volume (for LV only) size to the actual size - dstVol.extend((volParams['apparentsize'] + 511) / 512) + dstVol.enlarge((volParams['apparentsize'] + 511) / 512)
# Change destination volume metadata back to the original # type. @@ -742,7 +742,7 @@ newsize = volParams['size'] else: newsize = volParams['apparentsize'] - dstVol.extend(newsize) + dstVol.enlarge(newsize) dstPath = dstVol.getVolumePath() # Change destination volume metadata back to the original size. dstVol.setSize(volParams['size']) @@ -882,7 +882,7 @@ srcVol = sdDom.produceVolume(imgUUID=srcVolParams['imgUUID'], volUUID=srcVolParams['volUUID']) # Extend successor volume to new accumulated subchain size - srcVol.extend(newSize) + srcVol.enlarge(newSize)
srcVol.prepare(rw=True, chainrw=True, setrw=True) try: @@ -918,7 +918,7 @@ srcVol = sdDom.produceVolume(imgUUID=srcVolParams['imgUUID'], volUUID=srcVolParams['volUUID']) # Extend successor volume to new accumulated subchain size - srcVol.extend(newSize) + srcVol.enlarge(newSize) # Step 1: Create temporary volume with destination volume's parent # parameters newUUID = str(uuid.uuid4()) @@ -1178,7 +1178,7 @@ vol = self._activateVolumeForImportExport(domain, imgUUID, volUUID) try: # Extend the volume (if relevant) to the image size - vol.extend(imageSharing.getSize(methodArgs) / volume.BLOCK_SIZE) + vol.enlarge(imageSharing.getSize(methodArgs) / volume.BLOCK_SIZE) imageSharing.download(vol.getVolumePath(), methodArgs) finally: domain.deactivateVolumes(imgUUID, volUUIDs=[vol.volUUID]) diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py index 3f3c1bf..348c02a 100644 --- a/vdsm/storage/sp.py +++ b/vdsm/storage/sp.py @@ -2071,7 +2071,7 @@ raise se.NonLeafVolumeNotWritable(vol) targetPath = vol.getVolumePath() if vol.isSparse(): - vol.extend(int(size)) + vol.enlarge(int(size))
vol.prepare(rw=True, setrw=False) try: diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py index 10b3363..6a028e4 100644 --- a/vdsm/storage/volume.py +++ b/vdsm/storage/volume.py @@ -540,7 +540,7 @@ self.log.warn("Volume %s metadata error (%s)", self.volUUID, str(e))
- def extend(self, newsize): + def enlarge(self, newsize): """ Extend the apparent size of logical volume (thin provisioning) """
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/3804/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/3721/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/2913/ : SUCCESS
Yeela Kaplan has posted comments on this change.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Patch Set 1:
Why?
Eduardo has posted comments on this change.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Patch Set 1:
The function is really enlarging. And a re aa lot of extend calls all over the code. Needed for clarity and to move getSize() to the SD realm in a next patch.
Ayal Baron has posted comments on this change.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Patch Set 1: Code-Review-2
I see no point for this change (which is not explained in the commit message either). The new name is not even as good as the current one, let alone better.
Itamar Heim has posted comments on this change.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Patch Set 1:
ping
Eduardo has posted comments on this change.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Patch Set 1:
This patch enlights what the function does and in addition simplifies grepping the code avoiding confusion with list extend methods. Should be merged.
Itamar Heim has posted comments on this change.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Patch Set 1:
ping
Dan Kenigsberg has abandoned this change.
Change subject: Rename *Volume.extend method to *Volume.enlarge ......................................................................
Abandoned
vdsm-patches@lists.fedorahosted.org