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 <sage@redhat.com>
/// pools that exist in the osdmap for which at least one pg has been created
std::set<int64_t> 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) {
<< " (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;