We are holding osd_lock in check_osdmap_features, which means we cannot
block while waiting for filestore operations to flush/apply without
risking deadlock.
The important constraint is that we commit that the feature is enabled
before also commiting anything that utilizes sharded objects. The normal
commit sequencing does that already; there is no reason to block here.
Fixes: #8045
Signed-off-by: Sage Weil <sage@inktank.com>
!fs->get_allow_sharded_objects()) {
dout(0) << __func__ << " enabling on-disk ERASURE CODES compat feature" << dendl;
superblock.compat_features.incompat.insert(CEPH_OSD_FEATURE_INCOMPAT_SHARDS);
- ObjectStore::Transaction t;
- write_superblock(t);
- int err = store->apply_transaction(t);
+ ObjectStore::Transaction *t = new ObjectStore::Transaction;
+ write_superblock(*t);
+ int err = store->queue_transaction_and_cleanup(NULL, t);
assert(err == 0);
fs->set_allow_sharded_objects();
}