From: John Spray Date: Wed, 26 Sep 2018 16:45:31 +0000 (-0400) Subject: mon: use pg_num_target for checks during creation X-Git-Tag: v14.1.0~582^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0e101ae10ff9ac937452787597096966eb7fd9da;p=ceph.git mon: use pg_num_target for checks during creation 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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index ed675e4d91ad6..f94aba1937a00 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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) {