]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/DaemonServer: allow pgp_num increases to be fast if pool is empty(ish)
authorSage Weil <sage@redhat.com>
Mon, 29 Apr 2019 21:17:40 +0000 (16:17 -0500)
committerSage Weil <sage@redhat.com>
Mon, 29 Apr 2019 21:31:51 +0000 (16:31 -0500)
If we just created a new pool and it's basically empty, there is no reason
to throttle the pgp_num changes.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit c7c2d18da5058ffbe1f71e66a8d4c1dcfd8eacdb)

src/mgr/DaemonServer.cc

index 1a248eebf33aa5fb1f452e905891ef060846a466..b733668ccbd0d1c18c2749de0420f569c5f175df 100644 (file)
@@ -2584,7 +2584,12 @@ void DaemonServer::adjust_pgs()
            // max_misplaced, to somewhat limit the magnitude of
            // our potential error here.
            int next;
-           if (aggro) {
+
+           pool_stat_t s = pg_map.get_pg_pool_sum_stat(i.first);
+           if (aggro ||
+               // pool is (virtually) empty; just jump to final pgp_num?
+               (p.get_pgp_num_target() > p.get_pgp_num() &&
+                s.stats.sum.num_objects <= p.get_pgp_num_target())) {
              next = target;
            } else {
              double room =