]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #19546 from ZVampirEM77/wip-em-pg-cleanup3
authorKefu Chai <tchaikov@gmail.com>
Tue, 2 Jan 2018 16:00:45 +0000 (00:00 +0800)
committerGitHub <noreply@github.com>
Tue, 2 Jan 2018 16:00:45 +0000 (00:00 +0800)
osd/PG: some cleanups && add should_gather filter for loop logging

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

diff --cc src/osd/PG.cc
index 5b6bb10d0354ed53b0d58e151e874a23b1c5a67a,2d2dddf72d7d736ca3ec9dc1ab5051b55029d4db..9ff134169e000c75029017aa49a2239f91a23f91
@@@ -1237,18 -1237,20 +1237,19 @@@ void PG::calc_replicated_acting
    set<pg_shard_t> *acting_backfill,
    ostream &ss)
  {
-   ss << "calc_acting newest update on osd." << auth_log_shard->first
+   pg_shard_t auth_log_shard_id = auth_log_shard->first;
+   ss << __func__ << " newest update on osd." << auth_log_shard_id
       << " with " << auth_log_shard->second
       << (restrict_to_up_acting ? " restrict_to_up_acting" : "") << std::endl;
-   pg_shard_t auth_log_shard_id = auth_log_shard->first;
    
    // select primary
 -  map<pg_shard_t,pg_info_t>::const_iterator primary;
 +  map<pg_shard_t,pg_info_t>::const_iterator primary = all_info.find(up_primary);
    if (up.size() &&
 -      !all_info.find(up_primary)->second.is_incomplete() &&
 -      all_info.find(up_primary)->second.last_update >=
 +      !primary->second.is_incomplete() &&
 +      primary->second.last_update >=
          auth_log_shard->second.log_tail) {
      ss << "up_primary: " << up_primary << ") selected as primary" << std::endl;
 -    primary = all_info.find(up_primary); // prefer up[0], all thing being equal
    } else {
      assert(!auth_log_shard->second.is_incomplete());
      ss << "up[0] needs backfill, osd." << auth_log_shard_id