From 7db0fd0a8d69d29edbb8524256a85f78a636b5c1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 4 Apr 2018 16:20:06 -0500 Subject: [PATCH] TEST Revert "mon/OSDMonitor: disallow pg_num changes until after pool is created" This reverts commit 38319f8300ebf4a48b6910790467bad96d29941e. I want to reproduce the race to see if there is a better way to avoid it. This breaks tests that set pg_num, and generally makes interacting with the cluster awkward for anything non-human. # Conflicts: # src/mon/CreatingPGs.h Signed-off-by: Sage Weil --- src/mon/CreatingPGs.h | 11 ----------- src/mon/OSDMonitor.cc | 4 ---- 2 files changed, 15 deletions(-) diff --git a/src/mon/CreatingPGs.h b/src/mon/CreatingPGs.h index a80585032beca..fae7e6f2ce5ab 100644 --- a/src/mon/CreatingPGs.h +++ b/src/mon/CreatingPGs.h @@ -47,17 +47,6 @@ struct creating_pgs_t { /// pools that exist in the osdmap for which at least one pg has been created std::set created_pools; - bool is_creating_pool(int64_t poolid) { - if (queue.count(poolid)) { - return true; - } - for (auto& i : pgs) { - if (i.first.pool() == poolid) { - return true; - } - } - return false; - } bool create_pool(int64_t poolid, uint32_t pg_num, epoch_t created, utime_t modified) { if (created_pools.count(poolid) == 0) { diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 5bfb445b3873d..4eb692e10f862 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -6065,10 +6065,6 @@ int OSDMonitor::prepare_command_pool_set(const cmdmap_t& cmdmap, << " (you may adjust 'mon max pool pg num' for higher values)"; return -ERANGE; } - if (creating_pgs.is_creating_pool(pool)) { - ss << "still creating initial PGs; cannot update pg_num yet"; - return -EBUSY; - } int r = check_pg_num(pool, n, p.get_size(), &ss); if (r) { return r; -- 2.39.5