]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
dencoder: add JournalPointer to types.h
authorJohn Spray <john.spray@inktank.com>
Wed, 7 May 2014 11:17:09 +0000 (12:17 +0100)
committerJohn Spray <john.spray@inktank.com>
Tue, 20 May 2014 13:07:50 +0000 (14:07 +0100)
Signed-off-by: John Spray <john.spray@inktank.com>
src/osdc/Journaler.h
src/test/encoding/types.h

index 91c7d138288b502e8c16e55ace06b857e8386008..a1e999d974c14b210d2f4789a613c064374b9909 100644 (file)
@@ -121,6 +121,23 @@ class JournalPointer {
   bool is_null() const {
     return front == 0 && back == 0;
   }
+
+  void dump(Formatter *f) const {
+    f->open_object_section("journal_pointer");
+    {
+      f->dump_unsigned("front", front);
+      f->dump_unsigned("back", back);
+    }
+    f->close_section(); // journal_header
+  }
+
+  static void generate_test_instances(list<JournalPointer*> &ls)
+  {
+    ls.push_back(new JournalPointer());
+    ls.push_back(new JournalPointer());
+    ls.back()->front = 0xdeadbeef;
+    ls.back()->back = 0xfeedbead;
+  }
 };
 
 
index 679482a756f50b01cafbadcf5b2b02fbe8343ab8..24c99d9d8a76414c5a607b648fa7c5155cb25d6d 100644 (file)
@@ -130,6 +130,7 @@ TYPE(DBObjectMap::_Header)
 TYPE(DBObjectMap::State)
 
 #include "osdc/Journaler.h"
+TYPE(JournalPointer)
 TYPE(Journaler::Header)
 
 #include "mds/snap.h"