summaryrefslogtreecommitdiff
path: root/src/mon/OSDMonitor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mon/OSDMonitor.cc')
-rw-r--r--src/mon/OSDMonitor.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 3186c4d6bc3..476e5138b30 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -2696,7 +2696,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
return true;
}
} else if (m->cmd[2] == "set") {
- if (m->cmd.size() != 6) {
+ if (m->cmd.size() < 6) {
err = -EINVAL;
ss << "usage: osd pool set <poolname> <field> <value>";
goto out;
@@ -2740,12 +2740,12 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
paxos->wait_for_commit(new Monitor::C_Command(mon, m, 0, rs, paxos->get_version()));
return true;
} else if (m->cmd[4] == "pg_num") {
- if (true) {
- // ** DISABLE THIS FOR NOW **
- ss << "pg_num adjustment currently disabled (broken implementation)";
- // ** DISABLE THIS FOR NOW **
- } else
- if (n <= p->get_pg_num()) {
+ if (m->cmd.size() < 6 ||
+ m->cmd[6] != "--allow-experimental-feature") {
+ ss << "increasing pg_num is currently experimental, add "
+ << "--allow-experimental-feature as the last argument "
+ << "to force";
+ } else if (n <= p->get_pg_num()) {
ss << "specified pg_num " << n << " <= current " << p->get_pg_num();
} else if (!mon->pgmon()->pg_map.creating_pgs.empty()) {
ss << "currently creating pgs, wait";