mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
mon/OSDMonitor: fix wrong sanity check order for allow_ec_overwrites
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
parent
9205dd2059
commit
dfcb403a00
@ -6021,6 +6021,12 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
|
||||
ss << "ec overwrites can only be enabled for an erasure coded pool";
|
||||
return -EINVAL;
|
||||
}
|
||||
stringstream err;
|
||||
if (!g_conf->mon_debug_no_require_bluestore_for_ec_overwrites &&
|
||||
!is_pool_currently_all_bluestore(pool, p, &err)) {
|
||||
ss << "pool must only be stored on bluestore for scrubbing to work: " << err.str();
|
||||
return -EINVAL;
|
||||
}
|
||||
if (val == "true" || (interr.empty() && n == 1)) {
|
||||
p.flags |= pg_pool_t::FLAG_EC_OVERWRITES;
|
||||
} else if (val == "false" || (interr.empty() && n == 0)) {
|
||||
@ -6030,12 +6036,6 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
|
||||
ss << "expecting value 'true', 'false', '0', or '1'";
|
||||
return -EINVAL;
|
||||
}
|
||||
stringstream err;
|
||||
if (!g_conf->mon_debug_no_require_bluestore_for_ec_overwrites &&
|
||||
!is_pool_currently_all_bluestore(pool, p, &err)) {
|
||||
ss << "pool must only be stored on bluestore for scrubbing to work: " << err.str();
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if (var == "target_max_objects") {
|
||||
if (interr.length()) {
|
||||
ss << "error parsing int '" << val << "': " << interr;
|
||||
|
Loading…
Reference in New Issue
Block a user