]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/DaemonServer: allow pg_num increases that abort pending merges
authorSage Weil <sage@redhat.com>
Wed, 19 Sep 2018 19:08:49 +0000 (14:08 -0500)
committerSage Weil <sage@redhat.com>
Tue, 16 Oct 2018 12:22:48 +0000 (07:22 -0500)
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 <sage@redhat.com>
src/mgr/DaemonServer.cc

index 3fbf791b69ee897627cda89cacb3341eac3006de..312e3566394578a7acded647e4ca7815e9e92fd5 100644 (file)
@@ -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);