]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: Move data members of struct SnapRealm to private.
authorVarsha Rao <varao@redhat.com>
Tue, 24 Dec 2019 18:35:20 +0000 (00:05 +0530)
committerVarsha Rao <varao@redhat.com>
Tue, 24 Dec 2019 18:35:20 +0000 (00:05 +0530)
Most of the data members are used by methods of structure SnapRealm only. They
can be safely made private.

Signed-off-by: Varsha Rao <varao@redhat.com>
src/mds/SnapRealm.h

index 47bd950c482c3ec22d3a1559648b22917fb0af12..6e62e3898bcb4b4f27c2b709710afeef036f8d8c 100644 (file)
@@ -130,15 +130,11 @@ public:
   MDCache *mdcache;
   CInode *inode;
 
-  mutable bool open = false;                        // set to true once all past_parents are opened
   bool past_parents_dirty = false;
-  bool global;
 
   SnapRealm *parent = nullptr;
   set<SnapRealm*> open_children;    // active children that are currently open
   set<SnapRealm*> open_past_children;  // past children who has pinned me
-  map<inodeno_t, pair<SnapRealm*, set<snapid_t> > > open_past_parents;  // these are explicitly pinned.
-  unsigned num_open_past_parents = 0;
 
   elist<CInode*> inodes_with_caps = 0;             // for efficient realm splits
   map<client_t, xlist<Capability*>* > client_caps;   // to identify clients who need snap notifications
@@ -146,6 +142,13 @@ public:
 protected:
   void check_cache() const;
 
+private:
+  mutable bool open = false;                        // set to true once all past_parents are opened
+  bool global;
+
+  map<inodeno_t, pair<SnapRealm*, set<snapid_t> > > open_past_parents;  // these are explicitly pinned.
+  unsigned num_open_past_parents = 0;
+
   // cache
   mutable snapid_t cached_seq;           // max seq over self and all past+present parents.
   mutable snapid_t cached_last_created;  // max last_created over all past+present parents