list<MDSInternalContextBase*> ls;
ls.swap(p->second);
waiting_for_mdsmap.erase(p++);
- finish_contexts(g_ceph_context, ls);
+ queue_waiters(ls);
}
}
finished_queue.splice( finished_queue.end(), ls );
progress_thread.signal();
}
+ void queue_waiters_front(std::list<MDSInternalContextBase*>& ls) {
+ finished_queue.splice(finished_queue.begin(), ls);
+ progress_thread.signal();
+ }
MDSRank(
mds_rank_t whoami_,
}
}
+class C_MDC_QueueContexts : public MigratorContext {
+public:
+ list<MDSInternalContextBase*> contexts;
+ C_MDC_QueueContexts(Migrator *m) : MigratorContext(m) {}
+ void finish(int r) override {
+ // execute contexts immediately after 'this' context
+ get_mds()->queue_waiters_front(contexts);
+ }
+};
/*
* note: this does teh full work of reversing and import and cleaning up
cache->adjust_subtree_auth(dir, stat.peer);
- C_ContextsBase<MDSInternalContextBase, MDSInternalContextGather> *fin = new C_ContextsBase<MDSInternalContextBase, MDSInternalContextGather>(g_ceph_context);
+ auto fin = new C_MDC_QueueContexts(this);
if (!dir->get_inode()->is_auth() &&
!dir->get_inode()->has_subtree_root_dirfrag(mds->get_nodeid())) {
dir->get_inode()->clear_scatter_dirty();