]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSD: clean up the pg-merge code a bit
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 18 Sep 2018 08:37:56 +0000 (16:37 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 20 Dec 2018 01:07:00 +0000 (09:07 +0800)
Note that the __cur__ spg_t should already be included in the children set
and hence we could safely move that insertion.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.cc

index 92cec5482c9acbd5beb20ababd8184c4282b24e7..ea7e693403a6137174efd7b131f7b9bdca8f625a 100644 (file)
@@ -399,7 +399,6 @@ void OSDService::identify_splits_and_merges(
                       << " pg_num " << pgnum << " -> " << q->second
                       << " is merge source, target " << parent
                       << ", source(s) " << children << dendl;
-             merge_pgs->insert(make_pair(cur, q->first));
              merge_pgs->insert(make_pair(parent, q->first));
              for (auto c : children) {
                merge_pgs->insert(make_pair(c, q->first));
@@ -10193,11 +10192,11 @@ void OSDShard::prime_merges(const OSDMapRef& as_of_osdmap,
     slot = r.first->second.get();
     if (slot->pg) {
       // already have pg
-      dout(20) << __func__ << "  have merge target pg " << pgid
+      dout(20) << __func__ << "  have merge participant pg " << pgid
               << " " << slot->pg << dendl;
     } else if (!slot->waiting_for_split.empty() &&
               *slot->waiting_for_split.begin() < epoch) {
-      dout(20) << __func__ << "  pending split on merge target pg " << pgid
+      dout(20) << __func__ << "  pending split on merge participant pg " << pgid
               << " " << slot->waiting_for_split << dendl;
     } else {
       dout(20) << __func__ << "  creating empty merge participant " << pgid