mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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 <wido@widodh.nl>
This commit is contained in:
parent
375264aaa4
commit
4809fe7cb4
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user