]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Reorganize class members in JournalPointer header 29888/head
authorVarsha Rao <varao@redhat.com>
Mon, 26 Aug 2019 08:57:27 +0000 (04:57 -0400)
committerVarsha Rao <varao@redhat.com>
Thu, 12 Sep 2019 13:22:52 +0000 (18:52 +0530)
Fixes: https://tracker.ceph.com/issues/41430
Signed-off-by: Varsha Rao <varao@redhat.com>
src/mds/JournalPointer.h

index 1881f41d3a0572b6d61ea51a4574e20dd4d08669..8d4708e1d0919e54b1d3c17fe8de2aa09c55a4dd 100644 (file)
@@ -24,18 +24,9 @@ class Objecter;
 // This always lives in the same location for a given MDS
 // instance, it tells the daemon where to look for the journal.
 class JournalPointer {
-  // MDS rank
-  int node_id;
-  // Metadata pool ID
-  int64_t pool_id;
-
-  std::string get_object_id() const;
-
   public:
-  // The currently active journal
-  inodeno_t front;
-  // The backup journal, if any (may be 0)
-  inodeno_t back;
+  JournalPointer(int node_id_, int64_t pool_id_) : node_id(node_id_), pool_id(pool_id_) {}
+  JournalPointer() {}
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1, 1, bl);
@@ -51,11 +42,6 @@ class JournalPointer {
     DECODE_FINISH(bl);
   }
 
-  JournalPointer(int node_id_, int64_t pool_id_) : node_id(node_id_), pool_id(pool_id_),
-    front(0), back(0) {}
-
-  JournalPointer() : node_id(-1), pool_id(-1), front(0), back(0) {}
-
   int load(Objecter *objecter);
   int save(Objecter *objecter) const;
   void save(Objecter *objecter, Context *completion) const;
@@ -80,6 +66,19 @@ class JournalPointer {
     ls.back()->front = 0xdeadbeef;
     ls.back()->back = 0xfeedbead;
   }
+
+  // The currently active journal
+  inodeno_t front = 0;
+  // The backup journal, if any (may be 0)
+  inodeno_t back = 0;
+
+  private:
+  // MDS rank
+  int node_id = -1;
+  // Metadata pool ID
+  int64_t pool_id = -1;
+
+  std::string get_object_id() const;
 };
 WRITE_CLASS_ENCODER(JournalPointer)