diff options
Diffstat (limited to 'src/mds/MDSContext.h')
-rw-r--r-- | src/mds/MDSContext.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mds/MDSContext.h b/src/mds/MDSContext.h index 9da667403e3..34633093675 100644 --- a/src/mds/MDSContext.h +++ b/src/mds/MDSContext.h @@ -60,6 +60,20 @@ public: } }; +/** + * Wrap a regular Context up as an Internal context. Useful + * if you're trying to work with one of our more generic frameworks. + */ +class MDSInternalContextWrapper : public MDSInternalContextBase +{ +protected: + MDS *mds; + Context *fin; + MDS *get_mds(); +public: + MDSInternalContextWrapper(MDS *m, Context *c) : mds(m), fin(c) {} + void finish(int r); +}; class MDSIOContextBase : public MDSContext { @@ -82,6 +96,20 @@ public: } }; +/** + * Wrap a regular Context up as an IO Context. Useful + * if you're trying to work with one of our more generic frameworks. + */ +class MDSIOContextWrapper : public MDSIOContextBase +{ +protected: + MDS *mds; + Context *fin; + MDS *get_mds(); +public: + MDSIOContextWrapper(MDS *m, Context *c) : mds(m), fin(c) {} + void finish(int r); +}; /** * No-op for callers expecting MDSInternalContextBase |