weizhouapache commented on code in PR #11211:
URL: https://github.com/apache/cloudstack/pull/11211#discussion_r2212006607


##########
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java:
##########
@@ -1362,9 +1362,9 @@ public void resize(DataObject dataObject, 
AsyncCompletionCallback<CreateCmdResul
 
     @Override
     public long getVolumeSizeRequiredOnPool(long volumeSize, Long 
templateSize, boolean isEncryptionRequired) {
-        long newSizeInGB = volumeSize / (1024 * 1024 * 1024);
+        double newSizeInGB = volumeSize / (1024.0 * 1024 * 1024);
         if (templateSize != null && isEncryptionRequired && 
needsExpansionForEncryptionHeader(templateSize, volumeSize)) {
-            newSizeInGB = (volumeSize + (1<<30)) / (1024 * 1024 * 1024);
+            newSizeInGB = (volumeSize + (1<<30)) / (1024.0 * 1024 * 1024);
         }
         long newSizeIn8gbBoundary = (long) (Math.ceil(newSizeInGB / 8.0) * 
8.0);

Review Comment:
   newSizeIn8gbBoundary to newSizeIn8GBBoundary ?
   



-- 
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