From e4298336b9325c07add415b9c29cc7bdb8ccb65c Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 3 Nov 2022 10:30:53 -0400 Subject: [PATCH] mds: add stream dump for LogSegment Signed-off-by: Patrick Donnelly --- src/mds/LogSegment.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mds/LogSegment.h b/src/mds/LogSegment.h index 405760c47a8..0fbb824b348 100644 --- a/src/mds/LogSegment.h +++ b/src/mds/LogSegment.h @@ -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 + << std::dec << " events=" << ls.num_events << ")"; +} + #endif