From: Yin Congmin Date: Tue, 4 Jan 2022 08:09:27 +0000 (+0800) Subject: librbd/cache/pwl: merge multiple output "<<" calls X-Git-Tag: v17.1.0~124^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e96cdcb6585110c9d23ef7db67eac658b2177107;p=ceph.git librbd/cache/pwl: merge multiple output "<<" calls Follow the principle of fewer "<<" calls and higher performance. Merge multiple output "<<" calls. Signed-off-by: Yin Congmin --- diff --git a/src/librbd/BlockGuard.h b/src/librbd/BlockGuard.h index 1fbbc05c8e9a..1e56a6eedc52 100644 --- a/src/librbd/BlockGuard.h +++ b/src/librbd/BlockGuard.h @@ -32,8 +32,8 @@ struct BlockExtent { } friend std::ostream& operator<< (std::ostream& os, const BlockExtent& block_extent) { - os << "[block_start = " << block_extent.block_start << ", " - << "block_end = " << block_extent.block_end << ")"; + os << "[block_start=" << block_extent.block_start + << ", block_end=" << block_extent.block_end << "]"; return os; } }; @@ -71,8 +71,9 @@ public: int detain(const BlockExtent &block_extent, BlockOperation *block_operation, BlockGuardCell **cell) { std::lock_guard locker{m_lock}; - ldout(m_cct, 20) << block_extent << ", " - << "free_slots=" << m_free_detained_block_extents.size() + ldout(m_cct, 20) << block_extent + << ", free_slots=" + << m_free_detained_block_extents.size() << dendl; DetainedBlockExtent *detained_block_extent; @@ -115,8 +116,8 @@ public: ceph_assert(cell != nullptr); auto &detained_block_extent = reinterpret_cast( *cell); - ldout(m_cct, 20) << detained_block_extent.block_extent << ", " - << "pending_ops=" + ldout(m_cct, 20) << detained_block_extent.block_extent + << ", pending_ops=" << detained_block_extent.block_operations.size() << dendl; diff --git a/src/librbd/cache/pwl/AbstractWriteLog.cc b/src/librbd/cache/pwl/AbstractWriteLog.cc index 8ef052254616..b11d947d34fe 100644 --- a/src/librbd/cache/pwl/AbstractWriteLog.cc +++ b/src/librbd/cache/pwl/AbstractWriteLog.cc @@ -690,9 +690,9 @@ void AbstractWriteLog::read(Extents&& image_extents, C_ReadRequest *read_ctx = m_builder->create_read_request( cct, now, m_perfcounter, bl, on_finish); ldout(cct, 20) << "name: " << m_image_ctx.name << " id: " << m_image_ctx.id - << "image_extents=" << image_extents << ", " - << "bl=" << bl << ", " - << "on_finish=" << on_finish << dendl; + << "image_extents=" << image_extents + << ", bl=" << bl + << ", on_finish=" << on_finish << dendl; ceph_assert(m_initialized); bl->clear(); @@ -809,8 +809,8 @@ void AbstractWriteLog::read(Extents&& image_extents, } } - ldout(cct, 20) << "miss_extents=" << read_ctx->miss_extents << ", " - << "miss_bl=" << read_ctx->miss_bl << dendl; + ldout(cct, 20) << "miss_extents=" << read_ctx->miss_extents + << ", miss_bl=" << read_ctx->miss_bl << dendl; complete_read(log_entries_to_read, bls_to_read, ctx); } @@ -1248,8 +1248,8 @@ void AbstractWriteLog::append_scheduled(GenericLogOperations &ops, bool &ops_ std::advance(last_in_batch, ops_to_append); ops.splice(ops.end(), m_ops_to_append, m_ops_to_append.begin(), last_in_batch); ops_remain = true; /* Always check again before leaving */ - ldout(m_image_ctx.cct, 20) << "appending " << ops.size() << ", " - << m_ops_to_append.size() << " remain" << dendl; + ldout(m_image_ctx.cct, 20) << "appending " << ops.size() << ", remain " + << m_ops_to_append.size() << dendl; } else if (isRWL) { ops_remain = false; if (appending) { @@ -2048,8 +2048,8 @@ void AbstractWriteLog::internal_flush(bool invalidate, Context *on_finish) { << invalidate << ")" << dendl; if (m_log_entries.size()) { ldout(m_image_ctx.cct, 1) << "m_log_entries.size()=" - << m_log_entries.size() << ", " - << "front()=" << *m_log_entries.front() + << m_log_entries.size() + << ", front()=" << *m_log_entries.front() << dendl; } if (invalidate) { diff --git a/src/librbd/cache/pwl/LogEntry.cc b/src/librbd/cache/pwl/LogEntry.cc index 4118a9e3e330..c9af23688942 100644 --- a/src/librbd/cache/pwl/LogEntry.cc +++ b/src/librbd/cache/pwl/LogEntry.cc @@ -15,10 +15,10 @@ namespace cache { namespace pwl { std::ostream& GenericLogEntry::format(std::ostream &os) const { - os << "ram_entry=[" << ram_entry << "], " - << "cache_entry=" << (void*)cache_entry << ", " - << "log_entry_index=" << log_entry_index << ", " - << "completed=" << completed; + os << "ram_entry=[" << ram_entry + << "], cache_entry=" << (void*)cache_entry + << ", log_entry_index=" << log_entry_index + << ", completed=" << completed; return os; } @@ -30,13 +30,12 @@ std::ostream &operator<<(std::ostream &os, std::ostream& SyncPointLogEntry::format(std::ostream &os) const { os << "(Sync Point) "; GenericLogEntry::format(os); - os << ", " - << "writes=" << writes << ", " - << "bytes=" << bytes << ", " - << "writes_completed=" << writes_completed << ", " - << "writes_flushed=" << writes_flushed << ", " - << "prior_sync_point_flushed=" << prior_sync_point_flushed << ", " - << "next_sync_point_entry=" << next_sync_point_entry; + os << ", writes=" << writes + << ", bytes=" << bytes + << ", writes_completed=" << writes_completed + << ", writes_flushed=" << writes_flushed + << ", prior_sync_point_flushed=" << prior_sync_point_flushed + << ", next_sync_point_entry=" << next_sync_point_entry; return os; } @@ -54,15 +53,13 @@ bool GenericWriteLogEntry::can_writeback() const { std::ostream& GenericWriteLogEntry::format(std::ostream &os) const { GenericLogEntry::format(os); - os << ", " - << "sync_point_entry=["; + os << ", sync_point_entry=["; if (sync_point_entry) { os << *sync_point_entry; } else { os << "nullptr"; } - os << "], " - << "referring_map_entries=" << referring_map_entries; + os << "], referring_map_entries=" << referring_map_entries; return os; } @@ -91,10 +88,9 @@ void WriteLogEntry::init(bool has_data, std::ostream& WriteLogEntry::format(std::ostream &os) const { os << "(Write) "; GenericWriteLogEntry::format(os); - os << ", " - << "cache_buffer=" << (void*)cache_buffer << ", "; - os << "cache_bp=" << cache_bp << ", "; - os << "bl_refs=" << bl_refs; + os << ", cache_buffer=" << (void*)cache_buffer; + os << ", cache_bp=" << cache_bp; + os << ", bl_refs=" << bl_refs; return os; } diff --git a/src/librbd/cache/pwl/LogMap.cc b/src/librbd/cache/pwl/LogMap.cc index a2e6d65eb29e..b3e7022b08b1 100644 --- a/src/librbd/cache/pwl/LogMap.cc +++ b/src/librbd/cache/pwl/LogMap.cc @@ -17,8 +17,8 @@ namespace pwl { template std::ostream &operator<<(std::ostream &os, LogMapEntry &e) { - os << "block_extent=" << e.block_extent << ", " - << "log_entry=[" << e.log_entry << "]"; + os << "block_extent=" << e.block_extent + << ", log_entry=[" << e.log_entry << "]"; return os; } diff --git a/src/librbd/cache/pwl/LogOperation.cc b/src/librbd/cache/pwl/LogOperation.cc index 24d949387bf5..e779802f0cf8 100644 --- a/src/librbd/cache/pwl/LogOperation.cc +++ b/src/librbd/cache/pwl/LogOperation.cc @@ -20,11 +20,11 @@ GenericLogOperation::GenericLogOperation(utime_t dispatch_time, } std::ostream& GenericLogOperation::format(std::ostream &os) const { - os << "dispatch_time=[" << dispatch_time << "], " - << "buf_persist_start_time=[" << buf_persist_start_time << "], " - << "buf_persist_comp_time=[" << buf_persist_comp_time << "], " - << "log_append_start_time=[" << log_append_start_time << "], " - << "log_append_comp_time=[" << log_append_comp_time << "], "; + os << "dispatch_time=[" << dispatch_time + << "], buf_persist_start_time=[" << buf_persist_start_time + << "], buf_persist_comp_time=[" << buf_persist_comp_time + << "], log_append_start_time=[" << log_append_start_time + << "], log_append_comp_time=[" << log_append_comp_time << "]"; return os; } @@ -47,8 +47,7 @@ SyncPointLogOperation::~SyncPointLogOperation() { } std::ostream &SyncPointLogOperation::format(std::ostream &os) const { os << "(Sync Point) "; GenericLogOperation::format(os); - os << ", " - << "sync_point=[" << *sync_point << "]"; + os << ", sync_point=[" << *sync_point << "]"; return os; } @@ -207,14 +206,12 @@ std::ostream &WriteLogOperation::format(std::ostream &os) const { std::string op_name = is_writesame ? "(Write Same) " : "(Write) "; os << op_name; GenericWriteLogOperation::format(os); - os << ", "; if (log_entry) { - os << "log_entry=[" << *log_entry << "], "; + os << ", log_entry=[" << *log_entry << "]"; } else { - os << "log_entry=nullptr, "; + os << ", log_entry=nullptr"; } - os << "bl=[" << bl << "]," - << "buffer_alloc=" << buffer_alloc; + os << ", bl=[" << bl << "], buffer_alloc=" << buffer_alloc; return os; } @@ -269,9 +266,9 @@ WriteLogOperationSet::~WriteLogOperationSet() { } std::ostream &operator<<(std::ostream &os, const WriteLogOperationSet &s) { - os << "cell=" << (void*)s.cell << ", " - << "extent_ops_appending=[" << s.extent_ops_appending << ", " - << "extent_ops_persist=[" << s.extent_ops_persist << "]"; + os << "cell=" << (void*)s.cell + << ", extent_ops_appending=" << s.extent_ops_appending + << ", extent_ops_persist=" << s.extent_ops_persist; return os; } @@ -297,11 +294,10 @@ DiscardLogOperation::~DiscardLogOperation() { } std::ostream &DiscardLogOperation::format(std::ostream &os) const { os << "(Discard) "; GenericWriteLogOperation::format(os); - os << ", "; if (log_entry) { - os << "log_entry=[" << *log_entry << "], "; + os << ", log_entry=[" << *log_entry << "]"; } else { - os << "log_entry=nullptr, "; + os << ", log_entry=nullptr"; } return os; } diff --git a/src/librbd/cache/pwl/Request.cc b/src/librbd/cache/pwl/Request.cc index da185d8e3b67..c5dea8c8399d 100644 --- a/src/librbd/cache/pwl/Request.cc +++ b/src/librbd/cache/pwl/Request.cc @@ -35,13 +35,13 @@ C_BlockIORequest::~C_BlockIORequest() { template std::ostream &operator<<(std::ostream &os, const C_BlockIORequest &req) { - os << "image_extents=" << req.image_extents << "," - << " image_extents_summary=[" << req.image_extents_summary << "]," - << " bl=" << req.bl << "," - << " user_req=" << req.user_req << "," - << " m_user_req_completed=" << req.m_user_req_completed << "," - << " m_deferred=" << req.m_deferred << "," - << " detained=" << req.detained; + os << "image_extents=" << req.image_extents + << ", image_extents_summary=[" << req.image_extents_summary + << "], bl=" << req.bl + << ", user_req=" << req.user_req + << ", m_user_req_completed=" << req.m_user_req_completed + << ", m_deferred=" << req.m_deferred + << ", detained=" << req.detained; return os; } @@ -138,7 +138,7 @@ std::ostream &operator<<(std::ostream &os, os << (C_BlockIORequest&)req << " m_resources.allocated=" << req.m_resources.allocated; if (req.op_set) { - os << " op_set=" << *req.op_set; + os << " op_set=[" << *req.op_set << "]"; } return os; } @@ -208,8 +208,8 @@ void C_WriteRequest::setup_log_operations(DeferredContexts &on_exit) { current_sync_point, pwl.get_persist_on_flush(), pwl.get_context(), this); - ldout(pwl.get_context(), 20) << "write_req=[" << *this << "]" - << " op_set=" << op_set.get() << dendl; + ldout(pwl.get_context(), 20) << "write_req=[" << *this + << "], op_set=" << op_set.get() << dendl; ceph_assert(m_resources.allocated); /* op_set->operations initialized differently for plain write or write same */ auto allocation = m_resources.buffers.begin(); @@ -220,9 +220,9 @@ void C_WriteRequest::setup_log_operations(DeferredContexts &on_exit) { this->op_set->operations.emplace_back(operation); /* A WS is also a write */ - ldout(pwl.get_context(), 20) << "write_req=[" << *this << "]" - << " op_set=" << op_set.get() - << " operation=" << operation << dendl; + ldout(pwl.get_context(), 20) << "write_req=[" << *this + << "], op_set=" << op_set.get() + << ", operation=" << operation << dendl; log_entries.emplace_back(operation->log_entry); if (!op_set->persist_on_flush) { pwl.inc_last_op_sequence_num(); @@ -351,16 +351,16 @@ void C_FlushRequest::finish_req(int r) { template bool C_FlushRequest::alloc_resources() { - ldout(pwl.get_context(), 20) << "req type=" << get_name() << " " - << "req=[" << *this << "]" << dendl; + ldout(pwl.get_context(), 20) << "req type=" << get_name() + << " req=[" << *this << "]" << dendl; return pwl.alloc_resources(this); } template void C_FlushRequest::dispatch() { utime_t now = ceph_clock_now(); - ldout(pwl.get_context(), 20) << "req type=" << get_name() << " " - << "req=[" << *this << "]" << dendl; + ldout(pwl.get_context(), 20) << "req type=" << get_name() + << " req=[" << *this << "]" << dendl; ceph_assert(this->m_resources.allocated); this->m_dispatched_time = now; @@ -408,8 +408,8 @@ C_DiscardRequest::~C_DiscardRequest() { template bool C_DiscardRequest::alloc_resources() { - ldout(pwl.get_context(), 20) << "req type=" << get_name() << " " - << "req=[" << *this << "]" << dendl; + ldout(pwl.get_context(), 20) << "req type=" << get_name() + << " req=[" << *this << "]" << dendl; return pwl.alloc_resources(this); } @@ -449,8 +449,8 @@ void C_DiscardRequest::setup_log_operations() { template void C_DiscardRequest::dispatch() { utime_t now = ceph_clock_now(); - ldout(pwl.get_context(), 20) << "req type=" << get_name() << " " - << "req=[" << *this << "]" << dendl; + ldout(pwl.get_context(), 20) << "req type=" << get_name() + << " req=[" << *this << "]" << dendl; ceph_assert(this->m_resources.allocated); this->m_dispatched_time = now; setup_log_operations(); diff --git a/src/librbd/cache/pwl/Request.h b/src/librbd/cache/pwl/Request.h index 96f7d3f5cfba..4840b049e58d 100644 --- a/src/librbd/cache/pwl/Request.h +++ b/src/librbd/cache/pwl/Request.h @@ -309,10 +309,10 @@ struct BlockGuardReqState { bool queued = false; /* Queued for barrier */ friend std::ostream &operator<<(std::ostream &os, const BlockGuardReqState &r) { - os << "barrier=" << r.barrier << ", " - << "current_barrier=" << r.current_barrier << ", " - << "detained=" << r.detained << ", " - << "queued=" << r.queued; + os << "barrier=" << r.barrier + << ", current_barrier=" << r.current_barrier + << ", detained=" << r.detained + << ", queued=" << r.queued; return os; } }; @@ -347,9 +347,9 @@ public: } friend std::ostream &operator<<(std::ostream &os, const GuardedRequest &r) { - os << "guard_ctx->state=[" << r.guard_ctx->state << "], " - << "block_extent.block_start=" << r.block_extent.block_start << ", " - << "block_extent.block_start=" << r.block_extent.block_end; + os << "guard_ctx->state=[" << r.guard_ctx->state + << "], block_extent.block_start=" << r.block_extent.block_start + << ", block_extent.block_end=" << r.block_extent.block_end; return os; } }; diff --git a/src/librbd/cache/pwl/SyncPoint.cc b/src/librbd/cache/pwl/SyncPoint.cc index e0e13edf6fa1..6d45e7a30c88 100644 --- a/src/librbd/cache/pwl/SyncPoint.cc +++ b/src/librbd/cache/pwl/SyncPoint.cc @@ -29,16 +29,16 @@ SyncPoint::~SyncPoint() { std::ostream &operator<<(std::ostream &os, const SyncPoint &p) { - os << "log_entry=[" << *p.log_entry << "], " - << "earlier_sync_point=" << p.earlier_sync_point << ", " - << "later_sync_point=" << p.later_sync_point << ", " - << "m_final_op_sequence_num=" << p.m_final_op_sequence_num << ", " - << "m_prior_log_entries_persisted=" << p.m_prior_log_entries_persisted << ", " - << "m_prior_log_entries_persisted_complete=" << p.m_prior_log_entries_persisted_complete << ", " - << "m_append_scheduled=" << p.m_append_scheduled << ", " - << "appending=" << p.appending << ", " - << "on_sync_point_appending=" << p.on_sync_point_appending.size() << ", " - << "on_sync_point_persisted=" << p.on_sync_point_persisted.size(); + os << "log_entry=[" << *p.log_entry + << "], earlier_sync_point=" << p.earlier_sync_point + << ", later_sync_point=" << p.later_sync_point + << ", m_final_op_sequence_num=" << p.m_final_op_sequence_num + << ", m_prior_log_entries_persisted=" << p.m_prior_log_entries_persisted + << ", m_prior_log_entries_persisted_complete=" << p.m_prior_log_entries_persisted_complete + << ", m_append_scheduled=" << p.m_append_scheduled + << ", appending=" << p.appending + << ", on_sync_point_appending=" << p.on_sync_point_appending.size() + << ", on_sync_point_persisted=" << p.on_sync_point_persisted.size(); return os; } diff --git a/src/librbd/cache/pwl/Types.cc b/src/librbd/cache/pwl/Types.cc index c218c5773ea7..0ad162583420 100644 --- a/src/librbd/cache/pwl/Types.cc +++ b/src/librbd/cache/pwl/Types.cc @@ -114,18 +114,18 @@ void WriteLogPoolRoot::generate_test_instances(std::list& ls) std::ostream& operator<<(std::ostream& os, const WriteLogCacheEntry &entry) { - os << "entry_valid=" << (bool)entry.entry_valid << ", " - << "sync_point=" << (bool)entry.sync_point << ", " - << "sequenced=" << (bool)entry.sequenced << ", " - << "has_data=" << (bool)entry.has_data << ", " - << "discard=" << (bool)entry.discard << ", " - << "writesame=" << (bool)entry.writesame << ", " - << "sync_gen_number=" << entry.sync_gen_number << ", " - << "write_sequence_number=" << entry.write_sequence_number << ", " - << "image_offset_bytes=" << entry.image_offset_bytes << ", " - << "write_bytes=" << entry.write_bytes << ", " - << "ws_datalen=" << entry.ws_datalen << ", " - << "entry_index=" << entry.entry_index; + os << "entry_valid=" << (bool)entry.entry_valid + << ", sync_point=" << (bool)entry.sync_point + << ", sequenced=" << (bool)entry.sequenced + << ", has_data=" << (bool)entry.has_data + << ", discard=" << (bool)entry.discard + << ", writesame=" << (bool)entry.writesame + << ", sync_gen_number=" << entry.sync_gen_number + << ", write_sequence_number=" << entry.write_sequence_number + << ", image_offset_bytes=" << entry.image_offset_bytes + << ", write_bytes=" << entry.write_bytes + << ", ws_datalen=" << entry.ws_datalen + << ", entry_index=" << entry.entry_index; return os; } diff --git a/src/librbd/cache/pwl/Types.h b/src/librbd/cache/pwl/Types.h index 445be8262732..f7cd6cfac46e 100644 --- a/src/librbd/cache/pwl/Types.h +++ b/src/librbd/cache/pwl/Types.h @@ -345,9 +345,9 @@ public: explicit ExtentsSummary(const ExtentsType &extents); friend std::ostream &operator<<(std::ostream &os, const ExtentsSummary &s) { - os << "total_bytes=" << s.total_bytes << ", " - << "first_image_byte=" << s.first_image_byte << ", " - << "last_image_byte=" << s.last_image_byte; + os << "total_bytes=" << s.total_bytes + << ", first_image_byte=" << s.first_image_byte + << ", last_image_byte=" << s.last_image_byte; return os; } BlockExtent block_extent() { diff --git a/src/librbd/cache/pwl/rwl/Request.cc b/src/librbd/cache/pwl/rwl/Request.cc index 093e09a94f5c..a6b81d55b32e 100644 --- a/src/librbd/cache/pwl/rwl/Request.cc +++ b/src/librbd/cache/pwl/rwl/Request.cc @@ -49,10 +49,10 @@ template std::ostream &operator<<(std::ostream &os, const C_CompAndWriteRequest &req) { os << (C_WriteRequest&)req - << " cmp_bl=" << req.cmp_bl << "," - << " read_bl=" << req.read_bl << "," - << " compare_succeeded=" << req.compare_succeeded << "," - << " mismatch_offset=" << req.mismatch_offset; + << " cmp_bl=" << req.cmp_bl + << ", read_bl=" << req.read_bl + << ", compare_succeeded=" << req.compare_succeeded + << ", mismatch_offset=" << req.mismatch_offset; return os; } diff --git a/src/librbd/cache/pwl/rwl/WriteLog.cc b/src/librbd/cache/pwl/rwl/WriteLog.cc index fbf884e52547..c5de5fb4e421 100644 --- a/src/librbd/cache/pwl/rwl/WriteLog.cc +++ b/src/librbd/cache/pwl/rwl/WriteLog.cc @@ -156,15 +156,15 @@ int WriteLog::append_op_log_entries(GenericLogOperations &ops) } } ldout(m_image_ctx.cct, 20) << "Copying entry for operation at index=" - << operation->get_log_entry()->log_entry_index << " " - << "from " << &operation->get_log_entry()->ram_entry << " " - << "to " << operation->get_log_entry()->cache_entry << " " - << "operation=[" << *operation << "]" << dendl; + << operation->get_log_entry()->log_entry_index + << " from " << &operation->get_log_entry()->ram_entry + << " to " << operation->get_log_entry()->cache_entry + << " operation=[" << *operation << "]" << dendl; operation->log_append_start_time = now; *operation->get_log_entry()->cache_entry = operation->get_log_entry()->ram_entry; ldout(m_image_ctx.cct, 20) << "APPENDING: index=" - << operation->get_log_entry()->log_entry_index << " " - << "pmem_entry=[" << *operation->get_log_entry()->cache_entry + << operation->get_log_entry()->log_entry_index + << " pmem_entry=[" << *operation->get_log_entry()->cache_entry << "]" << dendl; entries_to_flush.push_back(operation); } @@ -223,10 +223,10 @@ void WriteLog::flush_op_log_entries(GenericLogOperationsVector &ops) ceph_assert(ops.front()->get_log_entry()->cache_entry < ops.back()->get_log_entry()->cache_entry); } - ldout(m_image_ctx.cct, 20) << "entry count=" << ops.size() << " " - << "start address=" - << ops.front()->get_log_entry()->cache_entry << " " - << "bytes=" + ldout(m_image_ctx.cct, 20) << "entry count=" << ops.size() + << " start address=" + << ops.front()->get_log_entry()->cache_entry + << " bytes=" << ops.size() * sizeof(*(ops.front()->get_log_entry()->cache_entry)) << dendl; pmemobj_flush(m_log_pool, @@ -630,8 +630,8 @@ void WriteLog::flush_then_append_scheduled_ops(void) std::advance(last_in_batch, ops_to_flush); ops.splice(ops.end(), m_ops_to_flush, m_ops_to_flush.begin(), last_in_batch); ops_remain = !m_ops_to_flush.empty(); - ldout(m_image_ctx.cct, 20) << "flushing " << ops.size() << ", " - << m_ops_to_flush.size() << " remain" << dendl; + ldout(m_image_ctx.cct, 20) << "flushing " << ops.size() << ", remain " + << m_ops_to_flush.size() << dendl; } else { ops_remain = false; } diff --git a/src/librbd/cache/pwl/ssd/Request.cc b/src/librbd/cache/pwl/ssd/Request.cc index 308db78f7c36..61e39b7c1d86 100644 --- a/src/librbd/cache/pwl/ssd/Request.cc +++ b/src/librbd/cache/pwl/ssd/Request.cc @@ -34,10 +34,10 @@ template std::ostream &operator<<(std::ostream &os, const C_CompAndWriteRequest &req) { os << (C_WriteRequest&)req - << " cmp_bl=" << req.cmp_bl << "," - << " read_bl=" << req.read_bl << "," - << " compare_succeeded=" << req.compare_succeeded << "," - << " mismatch_offset=" << req.mismatch_offset; + << " cmp_bl=" << req.cmp_bl + << ", read_bl=" << req.read_bl + << ", compare_succeeded=" << req.compare_succeeded + << ", mismatch_offset=" << req.mismatch_offset; return os; } diff --git a/src/librbd/cache/pwl/ssd/WriteLog.cc b/src/librbd/cache/pwl/ssd/WriteLog.cc index 8ffdb7e94d2c..a3b183411f3f 100644 --- a/src/librbd/cache/pwl/ssd/WriteLog.cc +++ b/src/librbd/cache/pwl/ssd/WriteLog.cc @@ -815,12 +815,12 @@ bool WriteLog::retire_entries(const unsigned long int frees_per_tx) { this->m_bytes_cached -= cached_bytes; ldout(m_image_ctx.cct, 20) - << "Finished root update: " << "initial_first_valid_entry=" - << initial_first_valid_entry << ", " << "m_first_valid_entry=" - << m_first_valid_entry << "," << "release space = " - << allocated_bytes << "," << "m_bytes_allocated=" - << m_bytes_allocated << "," << "release cached space=" - << cached_bytes << "," << "m_bytes_cached=" + << "Finished root update: initial_first_valid_entry=" + << initial_first_valid_entry << ", m_first_valid_entry=" + << m_first_valid_entry << ", release space = " + << allocated_bytes << ", m_bytes_allocated=" + << m_bytes_allocated << ", release cached space=" + << cached_bytes << ", m_bytes_cached=" << this->m_bytes_cached << dendl; this->m_alloc_failed_since_retire = false;