Skip to content

Commit

Permalink
volume: rename _extendSizeRaw
Browse files Browse the repository at this point in the history
Rename '_extendSizeRaw' to just '_extendSize',
as COW preallocated volumes can also reach
this call to extend LVs.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
  • Loading branch information
aesteve-rh committed Feb 20, 2023
1 parent 5e4389a commit 5eb8b8b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/vdsm/storage/blockVolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def setParentTag(self, puuid):
def getMetaSlot(self):
return self._manifest.getMetaSlot()

def _extendSizeRaw(self, new_capacity):
def _extendSize(self, new_capacity):
# Since this method relies on lvm.extendLV (lvextend) when the
# requested size is equal or smaller than the current size, the
# request is siliently ignored.
Expand Down
2 changes: 1 addition & 1 deletion lib/vdsm/storage/fileVolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def getLeaseVolumePath(self, vol_path=None):
# pylint: disable=no-member
return self._manifest.getLeaseVolumePath(vol_path)

def _extendSizeRaw(self, new_capacity):
def _extendSize(self, new_capacity):
volPath = self.getVolumePath()
cur_capacity = self.oop.os.stat(volPath).st_size

Expand Down
4 changes: 2 additions & 2 deletions lib/vdsm/storage/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ def extendSize(self, new_capacity):
"Extend size for volume: " + self.volUUID, "volume",
"Volume", "extendSizeFinalize",
[self.sdUUID, self.imgUUID, self.volUUID]))
self._extendSizeRaw(new_capacity)
self._extendSize(new_capacity)

self.syncMetadata() # update the metadata

Expand Down Expand Up @@ -1594,7 +1594,7 @@ def newVolumeLease(cls, metaId, sdUUID, volUUID):
def getImageVolumes(cls, sdUUID, imgUUID):
return cls.manifestClass.getImageVolumes(sdUUID, imgUUID)

def _extendSizeRaw(self, newSize):
def _extendSize(self, newSize):
raise NotImplementedError

# Used only for block volume
Expand Down

0 comments on commit 5eb8b8b

Please sign in to comment.