From 5219791b8fbcb7f5851a8546227854c703c15d52 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Wed, 28 Apr 2021 14:27:12 +0200 Subject: [PATCH] librbd/cache/pwl: include head and tail pointers in STATS While at it, reduce the number of calls to operator<< and drop the trailing comma. Signed-off-by: Ilya Dryomov (cherry picked from commit 2a974fd0c1b5439be15559133077efe132b6628c) --- src/librbd/cache/pwl/AbstractWriteLog.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/librbd/cache/pwl/AbstractWriteLog.cc b/src/librbd/cache/pwl/AbstractWriteLog.cc index 93979500435b7..68a735823b556 100644 --- a/src/librbd/cache/pwl/AbstractWriteLog.cc +++ b/src/librbd/cache/pwl/AbstractWriteLog.cc @@ -310,16 +310,17 @@ void AbstractWriteLog::log_perf() { template void AbstractWriteLog::periodic_stats() { std::lock_guard locker(m_lock); - ldout(m_image_ctx.cct, 1) << "STATS: " - << "m_free_log_entries=" << m_free_log_entries << ", " - << "m_log_entries=" << m_log_entries.size() << ", " - << "m_dirty_log_entries=" << m_dirty_log_entries.size() << ", " - << "m_bytes_allocated=" << m_bytes_allocated << ", " - << "m_bytes_cached=" << m_bytes_cached << ", " - << "m_bytes_dirty=" << m_bytes_dirty << ", " - << "bytes available=" << m_bytes_allocated_cap - m_bytes_allocated << ", " - << "m_current_sync_gen=" << m_current_sync_gen << ", " - << "m_flushed_sync_gen=" << m_flushed_sync_gen << ", " + ldout(m_image_ctx.cct, 1) << "STATS: m_log_entries=" << m_log_entries.size() + << ", m_dirty_log_entries=" << m_dirty_log_entries.size() + << ", m_free_log_entries=" << m_free_log_entries + << ", m_bytes_allocated=" << m_bytes_allocated + << ", m_bytes_cached=" << m_bytes_cached + << ", m_bytes_dirty=" << m_bytes_dirty + << ", bytes available=" << m_bytes_allocated_cap - m_bytes_allocated + << ", m_first_valid_entry=" << m_first_valid_entry + << ", m_first_free_entry=" << m_first_free_entry + << ", m_current_sync_gen=" << m_current_sync_gen + << ", m_flushed_sync_gen=" << m_flushed_sync_gen << dendl; } -- 2.39.5