]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: avoid copying chunks in a loop 55605/head
authorRonen Friedman <rfriedma@redhat.com>
Thu, 15 Feb 2024 18:17:57 +0000 (12:17 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Thu, 15 Feb 2024 18:17:57 +0000 (12:17 -0600)
to clear a static analyzer warning

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/PrimaryLogPG.cc

index 6e6e081444e55f2304ea6aab1c2effb0f9beb832..54462ab89a86373b4ded82c17acebe7467f459dc 100644 (file)
@@ -10503,7 +10503,7 @@ int PrimaryLogPG::start_dedup(OpRequestRef op, ObjectContextRef obc)
     obc_g ? &(obc_g->obs.oi.manifest) : nullptr,
     refs);
 
-  for (auto p : chunks) {
+  for (const auto& p : chunks) {
     hobject_t target = mop->new_manifest.chunk_map[p.first].oid;
     if (refs.find(target) == refs.end()) {
       continue;