JoaoJandre commented on code in PR #13901:
URL: https://github.com/apache/cloudstack/pull/13901#discussion_r4314164054


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeKbossBackupCommandWrapper.java:
##########
@@ -297,8 +298,13 @@ protected void convertDeltaToSecondary(String 
pathDeltaOnPrimary, String pathDel
         createDirsIfNeeded(pathDeltaOnSecondary, volumeUuid);
 
         QemuImg qemuImg = new QemuImg(waitInMillis);
-        qemuImg.convert(backupOrigin, backupDestination, parentBackup, null, 
null,  new QemuImageOptions(backupOrigin.getFormat(), 
backupOrigin.getFileName(), null), null,
-                true, false, false, false, null, null);
+        Map<String, String> options = new HashMap<>();
+        if (command.isCompress()) {
+            qemuImg.setCompressionTypeOptionIfAvailable(options, 
command.getCompressionLib());
+        }
+        qemuImg.convert(backupOrigin, backupDestination, parentBackup, 
options, null,  new QemuImageOptions(backupOrigin.getFormat(), 
backupOrigin.getFileName(), null), null,
+                true, false, false, command.isCompress(), 
command.getCoroutines(), command.getRateLimit());

Review Comment:
   I have refactored the rate limit check method so that it is used on both 
places.



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