From: Ronen Friedman Date: Thu, 15 Feb 2024 18:17:57 +0000 (-0600) Subject: osd: avoid copying chunks in a loop X-Git-Tag: v19.1.0~283^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1e0ef76adbb34a8f1b8d42d3409c7205d2fe95f7;p=ceph.git osd: avoid copying chunks in a loop to clear a static analyzer warning Signed-off-by: Ronen Friedman --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 6e6e081444e55..54462ab89a863 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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;