]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: set blocked_by during peering GetLog
authorSage Weil <sage@redhat.com>
Wed, 6 Aug 2014 21:02:17 +0000 (14:02 -0700)
committerSage Weil <sage@redhat.com>
Sat, 9 Aug 2014 01:12:30 +0000 (18:12 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index 9c2b9f02486b1658e1d1310cc7ee23ca3145337e..d5a973655f61ddee8ff689d23bd4f69a74c97cb6 100644 (file)
@@ -6812,6 +6812,10 @@ PG::RecoveryState::GetLog::GetLog(my_context ctx)
       auth_log_shard.shard, pg->pg_whoami.shard,
       request_log_from, pg->info.history,
       pg->get_osdmap()->get_epoch()));
+
+  assert(pg->blocked_by.empty());
+  pg->blocked_by.insert(auth_log_shard.osd);
+  pg->publish_stats_to_osd();
 }
 
 boost::statechart::result PG::RecoveryState::GetLog::react(const AdvMap& advmap)
@@ -6878,6 +6882,8 @@ void PG::RecoveryState::GetLog::exit()
   PG *pg = context< RecoveryMachine >().pg;
   utime_t dur = ceph_clock_now(pg->cct) - enter_time;
   pg->osd->recoverystate_perf->tinc(rs_getlog_latency, dur);
+  pg->blocked_by.clear();
+  pg->publish_stats_to_osd();
 }
 
 /*------WaitActingChange--------*/