From: Li Wang
Date: Fri, 30 Dec 2016 08:21:13 +0000 (+0000)
Subject: osd/PG.cc: avoid repetitive construction
X-Git-Tag: v12.0.3~223^2
X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2be974c6f60993e391e9713d828558e258b9935c;p=ceph.git
osd/PG.cc: avoid repetitive construction
Signed-off-by: Li Wang
---
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index 1d2857b84cc1..5270b18427ba 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -7690,6 +7690,7 @@ PG::RecoveryState::GetMissing::GetMissing(my_context ctx)
PG *pg = context< RecoveryMachine >().pg;
assert(!pg->actingbackfill.empty());
+ eversion_t since;
for (set::iterator i = pg->actingbackfill.begin();
i != pg->actingbackfill.end();
++i) {
@@ -7723,7 +7724,7 @@ PG::RecoveryState::GetMissing::GetMissing(my_context ctx)
// We pull the log from the peer's last_epoch_started to ensure we
// get enough log to detect divergent updates.
- eversion_t since(pi.last_epoch_started, 0);
+ since.epoch = pi.last_epoch_started;
assert(pi.last_update >= pg->info.log_tail); // or else choose_acting() did a bad thing
if (pi.log_tail <= since) {
dout(10) << " requesting log+missing since " << since << " from osd." << *i << dendl;