]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rbd.py: update with new features constants 4857/head
authorJosh Durgin <jdurgin@redhat.com>
Thu, 4 Jun 2015 20:13:57 +0000 (13:13 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Thu, 4 Jun 2015 20:32:23 +0000 (13:32 -0700)
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/pybind/rbd.py

index ac101c5ddb64f2039a9c4c259bc76f016c4b8729..042418bb93b99bf017b76b7ab4386599bd5bb67f 100644 (file)
@@ -28,6 +28,40 @@ ADMIN_AUID = 0
 RBD_FEATURE_LAYERING = 1
 RBD_FEATURE_STRIPINGV2 = 2
 RBD_FEATURE_EXCLUSIVE_LOCK = 4
+RBD_FEATURE_OBJECT_MAP = 8
+RBD_FEATURE_FAST_DIFF = 16
+RBD_FEATURE_DEEP_FLATTEN = 32
+
+RBD_FEATURES_ALL = (RBD_FEATURE_LAYERING       |
+                    RBD_FEATURE_STRIPINGV2     |
+                    RBD_FEATURE_EXCLUSIVE_LOCK |
+                    RBD_FEATURE_OBJECT_MAP     |
+                    RBD_FEATURE_FAST_DIFF      |
+                    RBD_FEATURE_DEEP_FLATTEN)
+
+# features that make an image inaccessible for read or write by
+# clients that don't understand them
+RBD_FEATURES_INCOMPATIBLE = (RBD_FEATURE_LAYERING |
+                             RBD_FEATURE_STRIPINGV2)
+
+# features that make an image unwritable by clients that don't
+# understand them
+RBD_FEATURES_RW_INCOMPATIBLE = (RBD_FEATURES_INCOMPATIBLE  |
+                                RBD_FEATURE_EXCLUSIVE_LOCK |
+                                RBD_FEATURE_OBJECT_MAP     |
+                                RBD_FEATURE_FAST_DIFF      |
+                                RBD_FEATURE_DEEP_FLATTEN)
+
+# features that may be dynamically enabled or disabled
+RBD_FEATURES_MUTABLE = (RBD_FEATURE_EXCLUSIVE_LOCK |
+                        RBD_FEATURE_OBJECT_MAP     |
+                        RBD_FEATURE_FAST_DIFF)
+
+# features that only work when used with a single client
+# using the image for writes
+RBD_FEATURES_SINGLE_CLIENT = (RBD_FEATURE_EXCLUSIVE_LOCK |
+                              RBD_FEATURE_OBJECT_MAP     |
+                              RBD_FEATURE_FAST_DIFF)
 
 RBD_FLAG_OBJECT_MAP_INVALID = 1