]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: dump, instances for PG::OndiskLog
authorSage Weil <sage.weil@dreamhost.com>
Wed, 1 Feb 2012 18:46:10 +0000 (10:46 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Wed, 1 Feb 2012 18:46:10 +0000 (10:46 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.h

index 1619e1ee8f00bba33ffe1ef90aea7bb23c8dbbea..be57ea8e5a13119ec0d327e8b489d143c2ae1fa1 100644 (file)
@@ -710,6 +710,17 @@ public:
       ::decode(tail, bl);
       ::decode(head, bl);
     }
+    void dump(Formatter *f) const {
+      f->dump_unsigned("head", head);
+      f->dump_unsigned("tail", tail);
+    }
+    static void generate_test_instances(list<OndiskLog>& o) {
+      OndiskLog a;
+      o.push_back(a);
+      a.tail = 1;
+      a.head = 2;
+      o.push_back(a);
+    }
   };
   WRITE_CLASS_ENCODER(OndiskLog)