Pearl1594 commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r809897698



##########
File path: 
engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
 
     AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
 
-    void resizeVolumeOnHypervisor(long volumeId, long newSize, long 
destHostId, String instanceName);
+    void resizeVolumeOnHypervisor(long volumeId, long currentSize, long 
newSize, long destHostId, String instanceName);

Review comment:
       Yes it should suffice as currentsize can be got from volume. But in case 
of an uploaded volume with a custom disk offering specified, we set the new 
size (i.e., the size that it would get resized to eventually during attach) as 
the volume size, instead of the physical size. And since I am reusing this 
method to resize the volume after the attach operation, vol.size() = 
currentSize would be equal to newSize. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to