DaanHoogland commented on a change in pull request #2985: kvm/ceph: When create 
a new RBD image use modern flags/features for t…
URL: https://github.com/apache/cloudstack/pull/2985#discussion_r229716210
 
 

 ##########
 File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
 ##########
 @@ -72,7 +72,15 @@
     private String _manageSnapshotPath;
 
     private String rbdTemplateSnapName = "cloudstack-base-snap";
-    private int rbdFeatures = (1 << 0); /* Feature 1<<0 means layering in RBD 
format 2 */
+    /*
+        Ceph RBD features to use when creating a new RBD image
+        (1 << 0): RBD_FEATURE_LAYERING
+        (1 << 2): RBD_FEATURE_EXCLUSIVE_LOCK
+        (1 << 3): RBD_FEATURE_OBJECT_MAP
+        (1 << 4): RBD_FEATURE_FAST_DIFF
+        (1 << 5): RBD_FEATURE_DEEP_FLATTEN
+     */
+    private int rbdFeatures = (1 << 0) + (1 << 2) + (1 << 3) + (1 << 4) + (1 
<< 5);
 
 Review comment:
   I like the first suggestion @GabrielBrascher makes, @wido . it comes down to 
"self documenting code by proper naming"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to