]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon: use pg_num_target for checks during creation
authorJohn Spray <john.spray@redhat.com>
Wed, 26 Sep 2018 16:45:31 +0000 (12:45 -0400)
committerSage Weil <sage@redhat.com>
Tue, 18 Dec 2018 19:30:54 +0000 (13:30 -0600)
This way, someone creating pools can proceed
as long as they've decreased the pg_num_target
of other pools, even if the adjustment hasn't
fully completed yet.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/OSDMonitor.cc

index ed675e4d91ad6bf997ea99df3c4fe71b103687d3..f94aba1937a0003a06f4aa042e1abd104571de59 100644 (file)
@@ -6610,7 +6610,7 @@ int OSDMonitor::check_pg_num(int64_t pool, int pg_num, int size, ostream *ss)
     if (i.first == pool) {
       projected += pg_num * size;
     } else {
-      projected += i.second.get_pg_num() * i.second.get_size();
+      projected += i.second.get_pg_num_target() * i.second.get_size();
     }
   }
   if (projected > max_pgs) {