]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: s/read/recovery_read/ in ECBackend::RecoveryMessages
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 29 Jun 2023 14:28:38 +0000 (14:28 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 9 Jan 2024 15:09:53 +0000 (15:09 +0000)
`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 <rzarzyns@redhat.com>
src/osd/ECBackend.cc

index 3083f6e698bc8bea76a8f391ee429146d49262a7..baef8b16f1269b0cc0371602c76549646180c793 100644 (file)
@@ -275,19 +275,20 @@ struct OnRecoveryReadComplete :
 
 struct RecoveryMessages {
   map<hobject_t,
-      ECBackend::read_request_t> reads;
+      ECBackend::read_request_t> recovery_reads;
   map<hobject_t, set<int>> want_to_read;
-  void read(
+  void recovery_read(
     ECBackend *ec,
     const hobject_t &hoid, uint64_t off, uint64_t len,
     set<int> &&_want_to_read,
     const map<pg_shard_t, vector<pair<int, int>>> &need,
-    bool attrs) {
+    bool attrs)
+  {
     list<boost::tuple<uint64_t, uint64_t, uint32_t> > 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,