]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds/MDLog: add const to member functions
authorMichal Jarzabek <stiopa@gmail.com>
Wed, 26 Oct 2016 21:13:48 +0000 (22:13 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Wed, 26 Oct 2016 21:13:48 +0000 (22:13 +0100)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mds/MDLog.cc
src/mds/MDLog.h

index de7806dea70003192ce2fb1d9d558a49c2c125ea..1938a744814809b3b6d918eee2ac4d71fb34a78e 100644 (file)
@@ -125,17 +125,17 @@ void MDLog::write_head(MDSInternalContextBase *c)
   journaler->write_head(fin);
 }
 
-uint64_t MDLog::get_read_pos()
+uint64_t MDLog::get_read_pos() const
 {
   return journaler->get_read_pos(); 
 }
 
-uint64_t MDLog::get_write_pos()
+uint64_t MDLog::get_write_pos() const
 {
   return journaler->get_write_pos(); 
 }
 
-uint64_t MDLog::get_safe_pos()
+uint64_t MDLog::get_safe_pos() const
 {
   return journaler->get_write_safe_pos(); 
 }
index e7658534117cfc8c80f7b2fedabffa851d030f3c..eb1c6b41dc75f4df778413b919e12cd0ae74a655 100644 (file)
@@ -161,7 +161,7 @@ protected:
   friend class ESubtreeMap;
   friend class MDCache;
 
-  uint64_t get_last_segment_seq() {
+  uint64_t get_last_segment_seq() const {
     assert(!segments.empty());
     return segments.rbegin()->first;
   }
@@ -237,7 +237,7 @@ public:
     return NULL;
   }
 
-  bool have_any_segments() {
+  bool have_any_segments() const {
     return !segments.empty();
   }
 
@@ -246,13 +246,13 @@ public:
   size_t get_num_events() const { return num_events; }
   size_t get_num_segments() const { return segments.size(); }
 
-  uint64_t get_read_pos();
-  uint64_t get_write_pos();
-  uint64_t get_safe_pos();
+  uint64_t get_read_pos() const;
+  uint64_t get_write_pos() const;
+  uint64_t get_safe_pos() const;
   Journaler *get_journaler() { return journaler; }
-  bool empty() { return segments.empty(); }
+  bool empty() const { return segments.empty(); }
 
-  bool is_capped() { return capped; }
+  bool is_capped() const { return capped; }
   void cap();
 
   void kick_submitter();
@@ -280,11 +280,11 @@ public:
     _submit_entry(e, c);
     submit_cond.Signal();
   }
-  bool entry_is_open() { return cur_event != NULL; }
+  bool entry_is_open() const { return cur_event != NULL; }
 
   void wait_for_safe( MDSInternalContextBase *c );
   void flush();
-  bool is_flushed() {
+  bool is_flushed() const {
     return unflushed == 0;
   }