]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #12720 from kylinstorage/wip-loop-invariant-code-motion
authorSage Weil <sage@newdream.net>
Wed, 26 Apr 2017 18:04:12 +0000 (13:04 -0500)
committerGitHub <noreply@github.com>
Wed, 26 Apr 2017 18:04:12 +0000 (13:04 -0500)
osd/PG.cc: loop invariant code motion

Reviewed-by: Sage Weil <sage@redhat.com>
1  2 
src/osd/PG.cc

diff --cc src/osd/PG.cc
index f8c14131f6dbe1040552c1e2696ae231ca743822,5270b18427ba985b21bea3d88a4632edcc6bb38d..49bd4863475afafeba0144897d63861c2b3a029c
@@@ -7995,10 -7724,10 +7996,10 @@@ PG::RecoveryState::GetMissing::GetMissi
  
      // 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;
 +      ldout(pg->cct, 10) << " requesting log+missing since " << since << " from osd." << *i << dendl;
        context< RecoveryMachine >().send_query(
        *i,
        pg_query_t(