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)) {
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;