From bb02c5e3c5f104f057bf63c14b48a858f3109d24 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Thu, 29 Jun 2023 14:28:38 +0000 Subject: [PATCH] osd: s/read/recovery_read/ in ECBackend::RecoveryMessages `read()` is simply too common for grep. Also, this commit will ensure there is no unnoticed new call site which could be problematic in the spot of the upcoming recovery read rework. Signed-off-by: Radoslaw Zarzynski --- src/osd/ECBackend.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 3083f6e698bc8..baef8b16f1269 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -275,19 +275,20 @@ struct OnRecoveryReadComplete : struct RecoveryMessages { map reads; + ECBackend::read_request_t> recovery_reads; map> want_to_read; - void read( + void recovery_read( ECBackend *ec, const hobject_t &hoid, uint64_t off, uint64_t len, set &&_want_to_read, const map>> &need, - bool attrs) { + bool attrs) + { list > to_read; to_read.push_back(boost::make_tuple(off, len, 0)); - ceph_assert(!reads.count(hoid)); + ceph_assert(!recovery_reads.count(hoid)); want_to_read.insert(make_pair(hoid, std::move(_want_to_read))); - reads.insert( + recovery_reads.insert( make_pair( hoid, ECBackend::read_request_t( @@ -582,12 +583,12 @@ void ECBackend::dispatch_recovery_messages(RecoveryMessages &m, int priority) get_parent()->queue_transaction(std::move(m.t)); } - if (m.reads.empty()) + if (m.recovery_reads.empty()) return; start_read_op( priority, m.want_to_read, - m.reads, + m.recovery_reads, OpRequestRef(), false, true); } @@ -636,7 +637,7 @@ void ECBackend::continue_recovery_op( recovery_ops.erase(op.hoid); return; } - m->read( + m->recovery_read( this, op.hoid, op.recovery_progress.data_recovered_to, -- 2.39.5