]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PG.cc: avoid repetitive construction
authorLi Wang <li.wang@kylin-cloud.com>
Fri, 30 Dec 2016 08:21:13 +0000 (08:21 +0000)
committerLi Wang <li.wang@kylin-cloud.com>
Sun, 1 Jan 2017 02:28:56 +0000 (02:28 +0000)
Signed-off-by: Li Wang <li.wang@kylin-cloud.com>
src/osd/PG.cc

index 1d2857b84cc18b16bf851f98b887540b2673d8ff..5270b18427ba985b21bea3d88a4632edcc6bb38d 100644 (file)
@@ -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<pg_shard_t>::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;