PG::update_store_with_options() is called on load *and* when the pool
properties change, but if we only need to fix bits right at load time.
More importantly, but doing a second check on pool change, we may race
with a previously queued collection create that is not yet readable via
filestore, try to (synchronously) set the property again, and deadlock.
Fixes: http://tracker.ceph.com/issues/19541
Signed-off-by: Sage Weil <sage@redhat.com>
if(r < 0 && r != -EOPNOTSUPP) {
derr << __func__ << "set_collection_opts returns error:" << r << dendl;
}
+}
+void PG::update_store_on_load()
+{
if (osd->store->get_type() == "filestore") {
// legacy filestore didn't store collection bit width; fix.
int bits = osd->store->collection_bits(coll);
pg->send_notify = (!pg->is_primary());
pg->update_store_with_options();
+ pg->update_store_on_load();
+
return transit< Reset >();
}
void prepare_write_info(map<string,bufferlist> *km);
void update_store_with_options();
+ void update_store_on_load();
public:
static int _prepare_write_info(