No reason to specialize to MDSContext.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
protected:
MDLog *mdlog;
MDSRank *get_mds() override {return mdlog->mds;}
- MDSContext *wrapped;
+ Context *wrapped;
void finish(int r) override {
if (wrapped)
}
public:
- C_MDL_Flushed(MDLog *m, MDSContext *w)
+ C_MDL_Flushed(MDLog *m, Context *w)
: mdlog(m), wrapped(w) {}
C_MDL_Flushed(MDLog *m, uint64_t wp) : mdlog(m), wrapped(NULL) {
set_write_pos(wp);
delete le;
} else {
if (data.fin) {
- MDSContext* fin =
- dynamic_cast<MDSContext*>(data.fin);
+ Context* fin = dynamic_cast<Context*>(data.fin);
ceph_assert(fin);
C_MDL_Flushed *fin2 = new C_MDL_Flushed(this, fin);
fin2->set_write_pos(journaler->get_write_pos());
}
}
-void MDLog::wait_for_safe(MDSContext *c)
+void MDLog::wait_for_safe(Context* c)
{
submit_mutex.lock();
}
bool entry_is_open() const { return cur_event != NULL; }
- void wait_for_safe( MDSContext *c );
+ void wait_for_safe(Context* c);
void flush();
bool is_flushed() const {
return unflushed == 0;
protected:
struct PendingEvent {
- PendingEvent(LogEvent *e, MDSContext *c, bool f=false) : le(e), fin(c), flush(f) {}
+ PendingEvent(LogEvent *e, Context* c, bool f=false) : le(e), fin(c), flush(f) {}
LogEvent *le;
- MDSContext *fin;
+ Context* fin;
bool flush;
};
{
protected:
bool async;
- MDSContext *wrapped;
+ Context *wrapped;
void finish(int r) override {
wrapped->complete(r);
wrapped = nullptr;
}
public:
- C_IO_Wrapper(MDSRank *mds_, MDSContext *wrapped_) :
+ C_IO_Wrapper(MDSRank *mds_, Context *wrapped_) :
MDSIOContext(mds_), async(true), wrapped(wrapped_) {
ceph_assert(wrapped != NULL);
}