]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: remove obsolete pg[p]_num vs creating pgs restriction
authorSage Weil <sage@redhat.com>
Fri, 9 Dec 2016 02:28:45 +0000 (20:28 -0600)
committerSage Weil <sage@redhat.com>
Mon, 19 Dec 2016 04:12:20 +0000 (23:12 -0500)
This dates back to the original split code circa
78ddc62b356cd0f26a9ac666b0f58ac0d0da8798 (v0.2) when the creating pg
code was a special case.  These days we rely on the generic peering code,
which has no issues with splits.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index f0d283a0fce396113c078c37b4af74e859194212..fb3157dd8f7365ca9804015f5b5dd50df4d1dd62 100644 (file)
@@ -5173,14 +5173,6 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
         << ')';
       return -E2BIG;
     }
-    for(set<pg_t>::iterator i = mon->pgmon()->pg_map.creating_pgs.begin();
-       i != mon->pgmon()->pg_map.creating_pgs.end();
-       ++i) {
-      if (i->m_pool == static_cast<uint64_t>(pool)) {
-       ss << "currently creating pgs, wait";
-       return -EBUSY;
-      }
-    }
     p.set_pg_num(n);
   } else if (var == "pgp_num") {
     if (p.has_flag(pg_pool_t::FLAG_NOPGCHANGE)) {
@@ -5199,14 +5191,6 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
       ss << "specified pgp_num " << n << " > pg_num " << p.get_pg_num();
       return -EINVAL;
     }
-    for(set<pg_t>::iterator i = mon->pgmon()->pg_map.creating_pgs.begin();
-       i != mon->pgmon()->pg_map.creating_pgs.end();
-       ++i) {
-      if (i->m_pool == static_cast<uint64_t>(pool)) {
-       ss << "currently creating pgs, wait";
-       return -EBUSY;
-      }
-    }
     p.set_pgp_num(n);
   } else if (var == "crush_ruleset") {
     if (interr.length()) {