{
ceph_assert(ceph_mutex_is_locked_by_me(submit_mutex));
ceph_assert(!mds->is_any_replay());
- ceph_assert(!capped);
+ ceph_assert(!mds_is_shutting_down);
ceph_assert(le == cur_event);
cur_event = NULL;
}
void MDLog::cap()
-{
- dout(5) << "cap" << dendl;
- capped = true;
+{
+ dout(5) << "mark mds is shutting down" << dendl;
+ mds_is_shutting_down = true;
}
void MDLog::shutdown()
mds->mds_lock.unlock();
// Because MDS::stopping is true, it's safe to drop mds_lock: nobody else
// picking it up will do anything with it.
-
+
submit_mutex.lock();
submit_cond.notify_all();
submit_mutex.unlock();
{
ceph_assert(ceph_mutex_is_locked_by_me(submit_mutex));
- if (capped) // shutting down the MDS
+ if (mds_is_shutting_down) // shutting down the MDS
return;
if (mds->mdcache->open_file_table.is_any_committing())
break;
}
- if (!capped && ls->seq >= oft_committed_seq) {
+ if (!mds_is_shutting_down && ls->seq >= oft_committed_seq) {
dout(10) << "_trim_expired_segments open file table committedseq " << oft_committed_seq
<< " <= " << ls->seq << "/" << ls->offset << dendl;
break;
dout(5) << "_expired segment " << ls->seq << "/" << ls->offset
<< ", " << ls->num_events << " events" << dendl;
- if (!capped && ls == peek_current_segment()) {
+ if (!mds_is_shutting_down && ls == peek_current_segment()) {
dout(5) << "_expired not expiring " << ls->seq << "/" << ls->offset
- << ", last one and !capped" << dendl;
+ << ", last one and !mds_is_shutting_down" << dendl;
} else {
// expired.
expired_segments.insert(ls);
Journaler *get_journaler() { return journaler; }
bool empty() const { return segments.empty(); }
- bool is_capped() const { return capped; }
+ bool is_capped() const { return mds_is_shutting_down; }
void cap();
void kick_submitter();
int num_events = 0; // in events
int unflushed = 0;
- bool capped = false;
+ bool mds_is_shutting_down = false;
// Log position which is persistent *and* for which
// submit_entry wait_for_safe callbacks have already