]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: add new RBD_FEATURE_JOURNALING feature code
authorJason Dillaman <dillaman@redhat.com>
Mon, 6 Jul 2015 15:53:21 +0000 (11:53 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 13 Nov 2015 01:17:52 +0000 (20:17 -0500)
When enabled, all mutable operations against an RBD image
will be recorded to a journal prior to changing the underlying
RBD image.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
doc/man/8/rbd.rst
src/include/rbd/features.h
src/test/cli/rbd/help.t
src/tools/rbd/ArgumentTypes.cc

index 826120fa1f2ccbb4d76e445ec5db639d0fb0b3f1..d306714f53ee9f19cb99bd2d9134f795674cf291 100644 (file)
@@ -141,6 +141,7 @@ Parameters
    * object-map: object map support (requires exclusive-lock)
    * fast-diff: fast diff calculations (requires object-map)
    * deep-flatten: snapshot flatten support
+   * journaling: journaled IO support (requires exclusive-lock)
 
 .. option:: --image-shared
 
index ac7b55890f405c958bc248b4d2323e86d62cbdc5..a78e6fc67624c3cc994be04ebaa9193e94f6ac68 100644 (file)
@@ -7,6 +7,7 @@
 #define RBD_FEATURE_OBJECT_MAP         (1<<3)
 #define RBD_FEATURE_FAST_DIFF           (1<<4)
 #define RBD_FEATURE_DEEP_FLATTEN        (1<<5)
+#define RBD_FEATURE_JOURNALING          (1<<6)
 
 /// features that make an image inaccessible for read or write by
 /// clients that don't understand them
                                         RBD_FEATURE_EXCLUSIVE_LOCK | \
                                         RBD_FEATURE_OBJECT_MAP     | \
                                          RBD_FEATURE_FAST_DIFF      | \
-                                         RBD_FEATURE_DEEP_FLATTEN)
+                                         RBD_FEATURE_DEEP_FLATTEN   | \
+                                         RBD_FEATURE_JOURNALING)
 
 #define 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)
+                                         RBD_FEATURE_DEEP_FLATTEN   | \
+                                         RBD_FEATURE_JOURNALING)
 
 /// features that may be dynamically enabled or disabled
 #define RBD_FEATURES_MUTABLE            (RBD_FEATURE_EXCLUSIVE_LOCK | \
                                          RBD_FEATURE_OBJECT_MAP     | \
-                                         RBD_FEATURE_FAST_DIFF)
+                                         RBD_FEATURE_FAST_DIFF      | \
+                                         RBD_FEATURE_JOURNALING)
 
 /// features that only work when used with a single client
 /// using the image for writes
 #define RBD_FEATURES_SINGLE_CLIENT (RBD_FEATURE_EXCLUSIVE_LOCK | \
                                     RBD_FEATURE_OBJECT_MAP     | \
-                                    RBD_FEATURE_FAST_DIFF)
+                                    RBD_FEATURE_FAST_DIFF      | \
+                                    RBD_FEATURE_JOURNALING)
 
 #endif
index 14fd23f0d88e807f2f2a5f937e3ec05064b9fc18..66e4e28b5453b2fd5ef1d9e0b48ea744807505e8 100644 (file)
     --order arg          object order [12 <= order <= 25]
     --image-feature arg  image features
                          [layering(+), striping(+), exclusive-lock(*),
-                         object-map(*), fast-diff(*), deep-flatten]
+                         object-map(*), fast-diff(*), deep-flatten, journaling(*)]
     --image-shared       shared image
     --stripe-unit arg    stripe unit
     --stripe-count arg   stripe count
     --order arg          object order [12 <= order <= 25]
     --image-feature arg  image features
                          [layering(+), striping(+), exclusive-lock(*),
-                         object-map(*), fast-diff(*), deep-flatten]
+                         object-map(*), fast-diff(*), deep-flatten, journaling(*)]
     --image-shared       shared image
     --stripe-unit arg    stripe unit
     --stripe-count arg   stripe count
                          (example: [<pool-name>/]<image-name>)
     <features>           image features
                          [layering, striping, exclusive-lock, object-map,
-                         fast-diff, deep-flatten]
+                         fast-diff, deep-flatten, journaling]
   
   Optional arguments
     -p [ --pool ] arg    pool name
                          (example: [<pool-name>/]<image-name>)
     <features>           image features
                          [layering, striping, exclusive-lock, object-map,
-                         fast-diff, deep-flatten]
+                         fast-diff, deep-flatten, journaling]
   
   Optional arguments
     -p [ --pool ] arg    pool name
     --order arg          object order [12 <= order <= 25]
     --image-feature arg  image features
                          [layering(+), striping(+), exclusive-lock(*),
-                         object-map(*), fast-diff(*), deep-flatten]
+                         object-map(*), fast-diff(*), deep-flatten, journaling(*)]
     --image-shared       shared image
     --stripe-unit arg    stripe unit
     --stripe-count arg   stripe count
index 95b9a383bdd6285caa2946567aec76b0181518ba..f18e88d76a6a5b7fc71182ddfc8fc2e3683dd54e 100644 (file)
@@ -22,7 +22,8 @@ const std::map<uint64_t, std::string> ImageFeatures::FEATURE_MAPPING = {
   {RBD_FEATURE_EXCLUSIVE_LOCK, "exclusive-lock"},
   {RBD_FEATURE_OBJECT_MAP, "object-map"},
   {RBD_FEATURE_FAST_DIFF, "fast-diff"},
-  {RBD_FEATURE_DEEP_FLATTEN, "deep-flatten"}};
+  {RBD_FEATURE_DEEP_FLATTEN, "deep-flatten"},
+  {RBD_FEATURE_JOURNALING, "journaling"}};
 
 Format::Formatter Format::create_formatter(bool pretty) const {
   if (value == "json") {