]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: move the class MDCacheIOContext to MDCache.h
authorXiubo Li <xiubli@redhat.com>
Thu, 14 Oct 2021 04:45:20 +0000 (12:45 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 13 Jan 2022 14:01:39 +0000 (22:01 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/MDCache.cc
src/mds/MDCache.h

index 9438925ffd65dda3d40f1ba536405eabca9b9a98..0ddba6482ce0c69f1625bad96698014c2484b538 100644 (file)
@@ -102,27 +102,6 @@ public:
   explicit MDCacheContext(MDCache *mdc_) : mdcache(mdc_) {}
 };
 
-
-/**
- * Only for contexts called back from an I/O completion
- *
- * Note: duplication of members wrt MDCacheContext, because
- * it'ls the lesser of two evils compared with introducing
- * yet another piece of (multiple) inheritance.
- */
-class MDCacheIOContext : public virtual MDSIOContextBase {
-protected:
-  MDCache *mdcache;
-  MDSRank *get_mds() override
-  {
-    ceph_assert(mdcache != NULL);
-    return mdcache->mds;
-  }
-public:
-  explicit MDCacheIOContext(MDCache *mdc_, bool track=true) :
-    MDSIOContextBase(track), mdcache(mdc_) {}
-};
-
 class MDCacheLogContext : public virtual MDSLogContextBase {
 protected:
   MDCache *mdcache;
index e08168b714170b0b26829950046d7dc83e8ea549..c0487afd7d555758c6f746f81268e97a7020d745 100644 (file)
@@ -1369,4 +1369,24 @@ private:
   bool drop_locks;
 };
 
+/**
+ * Only for contexts called back from an I/O completion
+ *
+ * Note: duplication of members wrt MDCacheContext, because
+ * it'ls the lesser of two evils compared with introducing
+ * yet another piece of (multiple) inheritance.
+ */
+class MDCacheIOContext : public virtual MDSIOContextBase {
+protected:
+  MDCache *mdcache;
+  MDSRank *get_mds() override
+  {
+    ceph_assert(mdcache != NULL);
+    return mdcache->mds;
+  }
+public:
+  explicit MDCacheIOContext(MDCache *mdc_, bool track=true) :
+    MDSIOContextBase(track), mdcache(mdc_) {}
+};
+
 #endif