From: Sage Weil Date: Thu, 20 Sep 2018 13:43:37 +0000 (-0500) Subject: mgr/DaemonServer: move pending merge check for more consistent code X-Git-Tag: v14.1.0~1136^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5bb9820b2d2b054dcd2309b63296d33c2538b54f;p=ceph.git mgr/DaemonServer: move pending merge check for more consistent code No functional change, but this makes the code simpler to read. Signed-off-by: Sage Weil --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index b65119c56c62..c643cd8aaf29 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -2277,20 +2277,20 @@ void DaemonServer::adjust_pgs() << " pg_num " << p.get_pg_num() << " - still creating initial pgs" << dendl; - } else if (p.get_pg_num() != p.get_pg_num_pending() && - p.get_pg_num_target() < p.get_pg_num()) { - dout(10) << "pool " << i.first - << " pg_num_target " << p.get_pg_num_target() - << " pg_num " << p.get_pg_num() - << " - decrease and pg_num_pending != pg_num, waiting" - << dendl; } else if (p.get_pg_num_target() < p.get_pg_num()) { // pg_num decrease (merge) pg_t merge_source(p.get_pg_num() - 1, i.first); pg_t merge_target = merge_source.get_parent(); bool ok = true; auto q = pg_map.pg_stat.find(merge_source); - if (p.get_pg_num() == p.get_pgp_num()) { + if (p.get_pg_num() != p.get_pg_num_pending()) { + dout(10) << "pool " << i.first + << " pg_num_target " << p.get_pg_num_target() + << " pg_num " << p.get_pg_num() + << " - decrease and pg_num_pending != pg_num, waiting" + << dendl; + ok = false; + } else if (p.get_pg_num() == p.get_pgp_num()) { dout(10) << "pool " << i.first << " pg_num_target " << p.get_pg_num_target() << " pg_num " << p.get_pg_num()