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

 ##########
 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:
   How about define the feature as various final int hex values and 
`rbdFeatures` can be the or-ed value of those features. Should there also be 
some kind of version vs feature check? 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to