]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: add print method for Journaler::Header
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 28 Aug 2024 03:03:33 +0000 (23:03 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 25 Sep 2024 19:42:26 +0000 (15:42 -0400)
For dout prints.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/osdc/Journaler.h

index 1b40eadec1696d89397c69cf26ee073c58f75999..4c141fea161bf44f2266718af59eae87fae75be5 100644 (file)
@@ -186,6 +186,16 @@ public:
       f->close_section(); // journal_header
     }
 
+    void print(std::ostream& os) const {
+      os << std::hex
+         << "Journaler::Header"
+            "(t=" << trimmed_pos
+         << " e=" << expire_pos
+         << " w=" << write_pos
+         << ")"
+         << std::dec;
+    }
+
     static void generate_test_instances(std::list<Header*> &ls)
     {
       ls.push_back(new Header());