From: Sage Weil Date: Wed, 19 Sep 2018 19:08:49 +0000 (-0500) Subject: mgr/DaemonServer: allow pg_num increases that abort pending merges X-Git-Tag: v14.1.0~1136^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b4c17cca15d3079b223be0110ac6cfa49bb68cee;p=ceph.git mgr/DaemonServer: allow pg_num increases that abort pending merges If we are waiting for a PG to merge we can't decrease more, but if we were in the process of merging and an increase is requested, we can abort the merge by increase pg_num_actual whenever we want. Signed-off-by: Sage Weil --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 3fbf791b69ee..312e35663945 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -2266,14 +2266,13 @@ 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()) { + } 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 << " target " << p.get_pg_num_target() << " pg_num " << p.get_pg_num() - << " - pg_num_pending != pg_num, waiting" + << " - decrease and pg_num_pending != pg_num, waiting" << dendl; - // FIXME: we might consider allowing pg_num increases without - // waiting for the previously planned merge to complete. } 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);