mon: require EC optimizations for Crimson EC pools
Reviewed-by: Alex Ainscow <aainscow@uk.ibm.com>
Reviewed-by: Bill Scales <bill_scales@uk.ibm.com>
}
}
p.flags |= pg_pool_t::FLAG_EC_OPTIMIZATIONS;
+
+ // Automatically enable omap support in fast EC pools
+ // Omap is not supported by EC pools in crimson
+ if (!p.is_crimson() && osdmap.require_osd_release >= ceph_release_t::umbrella) {
+ p.flags |= pg_pool_t::FLAG_OMAP;
+ }
} else {
if ((p.flags & pg_pool_t::FLAG_EC_OPTIMIZATIONS) != 0) {
- if (ss) {
- *ss << "allow_ec_optimizations cannot be disabled once enabled";
- }
- return -EINVAL;
+ return tl::unexpected(ErrorNMessage{
+ -EINVAL,
+ "allow_ec_optimizations cannot be disabled once enabled"});
}
}
- return 0;
+ return {};
}
void OSDMonitor::maybe_enable_pool_split_ops(pg_pool_t &p) {