mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
Merge pull request #16511 from c744402859/master
OSDMonitor: check mon_max_pool_pg_num when set pool pg_num Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
commit
65185cf09e
@ -6055,6 +6055,12 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
|
||||
return -EEXIST;
|
||||
return 0;
|
||||
}
|
||||
if (n > (unsigned)g_conf->mon_max_pool_pg_num) {
|
||||
ss << "'pg_num' must be greater than 0 and less than or equal to "
|
||||
<< g_conf->mon_max_pool_pg_num
|
||||
<< " (you may adjust 'mon max pool pg num' for higher values)";
|
||||
return -ERANGE;
|
||||
}
|
||||
string force;
|
||||
cmd_getval(g_ceph_context,cmdmap, "force", force);
|
||||
if (p.cache_mode != pg_pool_t::CACHEMODE_NONE &&
|
||||
|
Loading…
Reference in New Issue
Block a user