"compression_max_blob_size",
comp_max_blob_size.load(),
[&]() {
- uint64_t val;
+ int val;
if(c->pool_opts.get(pool_opts_t::COMPRESSION_MAX_BLOB_SIZE, &val)) {
- return boost::optional<uint64_t>(val);
+ return boost::optional<uint64_t>((uint64_t)val);
}
return boost::optional<uint64_t>();
}
"compression_min_blob_size",
comp_min_blob_size.load(),
[&]() {
- uint64_t val;
+ int val;
if(c->pool_opts.get(pool_opts_t::COMPRESSION_MIN_BLOB_SIZE, &val)) {
- return boost::optional<uint64_t>(val);
+ return boost::optional<uint64_t>((uint64_t)val);
}
return boost::optional<uint64_t>();
}
osdmap, lastmap, newup, up_primary,
newacting, acting_primary);
recovery_state.handle_event(evt, rctx);
- if (pool.info.last_change == osdmap_ref->get_epoch())
+ if (pool.info.last_change == osdmap_ref->get_epoch()) {
on_pool_change();
+ update_store_with_options();
+ }
}
void PG::handle_activate_map(RecoveryCtx *rctx)
recovery_state.handle_event(q, 0);
}
-
+void PG::update_store_with_options()
+{
+ auto r = osd->store->set_collection_opts(coll, pool.info.opts);
+ if(r < 0 && r != -EOPNOTSUPP) {
+ derr << __func__ << "set_collection_opts returns error:" << r << dendl;
+ }
+}
std::ostream& operator<<(std::ostream& oss,
const struct PG::PriorSet &prior)
// do we tell someone we're here?
pg->send_notify = (!pg->is_primary());
+ pg->update_store_with_options();
return transit< Reset >();
}
private:
void prepare_write_info(map<string,bufferlist> *km);
+ void update_store_with_options();
+
public:
static int _prepare_write_info(
map<string,bufferlist> *km,