Skip to content

Commit

Permalink
Merge pull request #11663 from stiopaa1/mds_mdslog_addConstToMemFunc
Browse files Browse the repository at this point in the history
mds/MDLog: add const to member functions
  • Loading branch information
liewegas committed Oct 28, 2016
2 parents dcc777a + f64ae8a commit 82ee518
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/mds/MDLog.cc
Expand Up @@ -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();
}
Expand Down
18 changes: 9 additions & 9 deletions src/mds/MDLog.h
Expand Up @@ -169,7 +169,7 @@ class MDLog {
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;
}
Expand Down Expand Up @@ -245,7 +245,7 @@ class MDLog {
return NULL;
}

bool have_any_segments() {
bool have_any_segments() const {
return !segments.empty();
}

Expand All @@ -254,13 +254,13 @@ class MDLog {
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();
Expand Down Expand Up @@ -288,11 +288,11 @@ class MDLog {
_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;
}

Expand Down

0 comments on commit 82ee518

Please sign in to comment.