]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: move comments to the proper place
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 16 Aug 2018 05:49:12 +0000 (13:49 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 31 Aug 2018 05:51:04 +0000 (13:51 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PG.cc

index 95c92f670f2549592622a45af0b6a8958f3f3ef6..5c12a309662622bb05ba7d54c427a72ebea15ff3 100644 (file)
@@ -1349,10 +1349,16 @@ void PG::calc_replicated_acting(
   acting_backfill->insert(primary->first);
   unsigned usable = 1;
 
-  // select replicas that have log contiguity with primary.
-  // prefer up, then acting, then any peer_info osds
+  /* We include auth_log_shard->second.log_tail because in GetLog,
+   * we will request logs back to the min last_update over our
+   * acting_backfill set, which will result in our log being extended
+   * as far backwards as necessary to pick up any peers which can
+   * be log recovered by auth_log_shard's log */
   eversion_t oldest_auth_log_entry =
     std::min(primary->second.log_tail, auth_log_shard->second.log_tail);
+
+  // select replicas that have log contiguity with primary.
+  // prefer up, then acting, then any peer_info osds
   for (vector<int>::const_iterator i = up.begin();
        i != up.end();
        ++i) {
@@ -1362,11 +1368,6 @@ void PG::calc_replicated_acting(
     const pg_info_t &cur_info = all_info.find(up_cand)->second;
     if (cur_info.is_incomplete() ||
         cur_info.last_update < oldest_auth_log_entry) {
-      /* We include auth_log_shard->second.log_tail because in GetLog,
-       * we will request logs back to the min last_update over our
-       * acting_backfill set, which will result in our log being extended
-       * as far backwards as necessary to pick up any peers which can
-       * be log recovered by auth_log_shard's log */
       ss << " shard " << up_cand << " (up) backfill " << cur_info << std::endl;
       backfill->insert(up_cand);
       acting_backfill->insert(up_cand);