This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push: new 4809fe7 kvm/ceph: When create a new RBD image use modern flags/features for the image (#2985) 4809fe7 is described below commit 4809fe7cb434010adc776a0da40cdf37848cc26e Author: Wido den Hollander <w...@widodh.nl> AuthorDate: Mon Nov 12 13:08:54 2018 +0100 kvm/ceph: When create a new RBD image use modern flags/features for the image (#2985) These additional RBD features allow for faster lookups of how much space a RBD image is using, but with the exclusive locking we prevent two VMs from writing to the same RBD image at the same time. These are the default features used by Ceph for any new RBD image. Signed-off-by: Wido den Hollander <w...@widodh.nl> --- .../com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java index 7500540..dc8083f 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java @@ -72,7 +72,12 @@ public class LibvirtStorageAdaptor implements StorageAdaptor { private String _manageSnapshotPath; private String rbdTemplateSnapName = "cloudstack-base-snap"; - private int rbdFeatures = (1 << 0); /* Feature 1<<0 means layering in RBD format 2 */ + private static final int RBD_FEATURE_LAYERING = 1; + private static final int RBD_FEATURE_EXCLUSIVE_LOCK = 4; + private static final int RBD_FEATURE_OBJECT_MAP = 8; + private static final int RBD_FEATURE_FAST_DIFF = 16; + private static final int RBD_FEATURE_DEEP_FLATTEN = 32; + private int rbdFeatures = RBD_FEATURE_LAYERING + RBD_FEATURE_EXCLUSIVE_LOCK + RBD_FEATURE_OBJECT_MAP + RBD_FEATURE_FAST_DIFF + RBD_FEATURE_DEEP_FLATTEN; private int rbdOrder = 0; /* Order 0 means 4MB blocks (the default) */ public LibvirtStorageAdaptor(StorageLayer storage) {