The MDSGatherBuilder was not correctly used / wired up.
Fixes: https://tracker.ceph.com/issues/46765
Fixes: 77eb368d2d35f2418875227fff9a34b5ef15a290
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
}
}
-void MDCache::wait_for_uncommitted_fragments(MDSGather *gather)
+void MDCache::wait_for_uncommitted_fragments(MDSContext* finisher)
{
- for (auto& p : uncommitted_fragments)
- p.second.waiters.push_back(gather->new_sub());
+ MDSGatherBuilder gather(g_ceph_context, finisher);
+ for (auto& p : uncommitted_fragments) {
+ p.second.waiters.push_back(gather.new_sub());
+ }
+ gather.activate();
}
struct C_MDC_FragmentRollback : public MDCacheLogContext {
bool is_any_uncommitted_fragment() const {
return !uncommitted_fragments.empty();
}
- void wait_for_uncommitted_fragments(MDSGather *gather);
+ void wait_for_uncommitted_fragments(MDSContext* finisher);
void rollback_uncommitted_fragments();
void split_dir(CDir *dir, int byn);
if (mdcache->is_any_uncommitted_fragment()) {
dout(1) << " waiting for uncommitted fragments" << dendl;
- MDSGatherBuilder gather(g_ceph_context, new C_MDS_VoidFn(this, &MDSRank::rejoin_done));
- mdcache->wait_for_uncommitted_fragments(gather.get());
- gather.activate();
+ mdcache->wait_for_uncommitted_fragments(new C_MDS_VoidFn(this, &MDSRank::rejoin_done));
return;
}