]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Reorganize class members in ScatterLock header 31716/head
authorVarsha Rao <varao@redhat.com>
Mon, 18 Nov 2019 15:13:42 +0000 (20:43 +0530)
committerVarsha Rao <varao@redhat.com>
Mon, 18 Nov 2019 15:13:42 +0000 (20:43 +0530)
Fixes: https://tracker.ceph.com/issues/42864
Signed-off-by: Varsha Rao <varao@redhat.com>
src/mds/ScatterLock.h

index f2fe7938f4b6872b42ec635fbc12f142debb5471..27f9ba47bab2e12a280b3296e780960c04eb78e9 100644 (file)
 #include "MDSContext.h"
 
 class ScatterLock : public SimpleLock {
-
-  struct more_bits_t {
-    xlist<ScatterLock*>::item item_updated;
-    utime_t update_stamp;
-
-    explicit more_bits_t(ScatterLock *lock) :
-      item_updated(lock)
-    {}
-  };
-
-  mutable std::unique_ptr<more_bits_t> _more;
-
-  more_bits_t *more() {
-    if (!_more)
-      _more.reset(new more_bits_t(this));
-    return _more.get();
-  }
-
-  enum {
-    SCATTER_WANTED   = 1 << 8,
-    UNSCATTER_WANTED = 1 << 9,
-    DIRTY            = 1 << 10,
-    FLUSHING         = 1 << 11,
-    FLUSHED          = 1 << 12,
-  };
-
 public:
   ScatterLock(MDSCacheObject *o, LockType *lt) :
     SimpleLock(o, lt) {}
@@ -231,6 +205,29 @@ public:
   }
 
 private:
+  struct more_bits_t {
+    xlist<ScatterLock*>::item item_updated;
+    utime_t update_stamp;
+
+    explicit more_bits_t(ScatterLock *lock) :
+      item_updated(lock)
+    {}
+  };
+
+  more_bits_t *more() {
+    if (!_more)
+      _more.reset(new more_bits_t(this));
+    return _more.get();
+  }
+
+  enum {
+    SCATTER_WANTED   = 1 << 8,
+    UNSCATTER_WANTED = 1 << 9,
+    DIRTY            = 1 << 10,
+    FLUSHING         = 1 << 11,
+    FLUSHED          = 1 << 12,
+  };
+
   void set_flushing() {
     state_flags |= FLUSHING;
   }
@@ -250,6 +247,8 @@ private:
       _more.reset();
     }
   }
+
+  mutable std::unique_ptr<more_bits_t> _more;
 };
 
 #endif