]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: dump log segment end along with offset
authorVenky Shankar <vshankar@redhat.com>
Thu, 1 Aug 2024 13:09:59 +0000 (13:09 +0000)
committerVenky Shankar <vshankar@redhat.com>
Mon, 11 Nov 2024 09:31:11 +0000 (15:01 +0530)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 5639fa298dcbb8c02f8b413ad5f734f63d2ac7be)

 Conflicts:
src/mds/LogSegment.h

src/mds/LogSegment.h does not overload "<<" operator, but the log
dump is beneficial, so copy out the overload.

src/mds/LogSegment.h

index 405760c47a83ed2eb8ed363c4c78f45ca64c03d8..2e06fe90bf905b222c3840ce1c62b2ad00b15b4e 100644 (file)
@@ -106,4 +106,9 @@ class LogSegment {
   MDSContext::vec expiry_waiters;
 };
 
+static inline std::ostream& operator<<(std::ostream& out, const LogSegment& ls) {
+  return out << "LogSegment(" << ls.seq << "/0x" << std::hex << ls.offset
+             << "~" << ls.end << std::dec << " events=" << ls.num_events << ")";
+}
+
 #endif