]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/seastore_type: add operator<< for delta_info_t
authorSamuel Just <sjust@redhat.com>
Mon, 15 Jun 2020 20:31:35 +0000 (13:31 -0700)
committerSamuel Just <sjust@redhat.com>
Fri, 19 Jun 2020 19:59:26 +0000 (12:59 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/seastore_types.cc
src/crimson/os/seastore/seastore_types.h

index d68f4b06b4c27e05b44eac2aa7d649cdb1d4f978..8532a7dd71aa121097451c8cbab4ab0dfe9b2fc1 100644 (file)
@@ -73,4 +73,16 @@ std::ostream &operator<<(std::ostream &out, const paddr_list_t &rhs)
   return out << ']';
 }
 
+std::ostream &operator<<(std::ostream &lhs, const delta_info_t &rhs)
+{
+  return lhs << "delta_info_t("
+            << "type: " << rhs.type
+            << ", paddr: " << rhs.paddr
+            << ", prev_crc: " << rhs.prev_crc
+            << ", final_crc: " << rhs.final_crc
+            << ", length: " << rhs.length
+            << ", pversion: " << rhs.pversion
+            << ")";
+}
+
 }
index 0fcb7e4fdca842b69fb50c66be1f3591cf0fd3c9..ba5112e21882374fb2b526b372e7c47141d9ecb7 100644 (file)
@@ -267,8 +267,12 @@ struct delta_info_t {
       bl == rhs.bl
     );
   }
+
+  friend std::ostream &operator<<(std::ostream &lhs, const delta_info_t &rhs);
 };
 
+std::ostream &operator<<(std::ostream &lhs, const delta_info_t &rhs);
+
 struct record_t {
   std::vector<extent_t> extents;
   std::vector<delta_info_t> deltas;