]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDSTable: add const to member functions 10846/head
authorMichal Jarzabek <stiopa@gmail.com>
Wed, 24 Aug 2016 18:19:22 +0000 (19:19 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Wed, 24 Aug 2016 18:19:22 +0000 (19:19 +0100)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mds/MDSTable.cc
src/mds/MDSTable.h

index 083eae9960c01b11d27360cef1764d7cd606b5b2..c8adddc16ed5be035dee7d6575f297f086f12946 100644 (file)
@@ -130,7 +130,7 @@ public:
   }
 };
 
-object_t MDSTable::get_object_name()
+object_t MDSTable::get_object_name() const
 {
   char n[50];
   if (per_mds)
index 904ecfd9ea71543be3d04fd040c3ded35c6ac0cc..13e9bf55f96c88dab6dc48c0ff99a1a934bdd154 100644 (file)
@@ -31,7 +31,7 @@ protected:
   bool per_mds;
   mds_rank_t rank;
 
-  object_t get_object_name();
+  object_t get_object_name() const;
   
   static const int STATE_UNDEF   = 0;
   static const int STATE_OPENING = 1;
@@ -55,10 +55,10 @@ public:
     rank = r;
   }
 
-  version_t get_version() { return version; }
-  version_t get_committed_version() { return committed_version; }
-  version_t get_committing_version() { return committing_version; }
-  version_t get_projected_version() { return projected_version; }
+  version_t get_version() const { return version; }
+  version_t get_committed_version() const { return committed_version; }
+  version_t get_committing_version() const { return committing_version; }
+  version_t get_projected_version() const { return projected_version; }
   
   void force_replay_version(version_t v) {
     version = projected_version = v;
@@ -68,9 +68,9 @@ public:
   //version_t inc_version() { return ++version; }
 
   // load/save from disk (hack)
-  bool is_undef() { return state == STATE_UNDEF; }
-  bool is_active() { return state == STATE_ACTIVE; }
-  bool is_opening() { return state == STATE_OPENING; }
+  bool is_undef() const { return state == STATE_UNDEF; }
+  bool is_active() const { return state == STATE_ACTIVE; }
+  bool is_opening() const { return state == STATE_OPENING; }
 
   void reset();
   void save(MDSInternalContextBase *onfinish=0, version_t need=0);