From: Josh Durgin Date: Thu, 4 Jun 2015 20:13:57 +0000 (-0700) Subject: pybind/rbd.py: update with new features constants X-Git-Tag: v9.0.2~47^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eb6a1df80bd45e0f47eba88432b06ed22fd1685f;p=ceph.git pybind/rbd.py: update with new features constants Signed-off-by: Josh Durgin --- diff --git a/src/pybind/rbd.py b/src/pybind/rbd.py index ac101c5ddb6..042418bb93b 100644 --- a/src/pybind/rbd.py +++ b/src/pybind/rbd.py @@ -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