last_seq = get_last_segment_seq();
if (!capped &&
!mds->mdcache->open_file_table.is_any_committing() &&
- last_seq > mds->mdcache->open_file_table.get_committing_log_seq()) {
+ last_seq > mds->mdcache->open_file_table.get_committed_log_seq()) {
submit_mutex.unlock();
mds->mdcache->open_file_table.commit(new C_OFT_Committed(this, last_seq),
last_seq, CEPH_MSG_PRIO_DEFAULT);
void OpenFileTable::_commit_finish(int r, uint64_t log_seq, MDSContext *fin)
{
- dout(10) << __func__ << " log_seq " << log_seq << dendl;
+ dout(10) << __func__ << " log_seq " << log_seq << " committed_log_seq " << committed_log_seq
+ << " committing_log_seq " << committing_log_seq << dendl;
if (r < 0) {
mds->handle_write_error(r);
return;
}
- ceph_assert(log_seq <= committing_log_seq);
+ ceph_assert(log_seq == committing_log_seq);
ceph_assert(log_seq >= committed_log_seq);
committed_log_seq = log_seq;
num_pending_commit--;
void OpenFileTable::commit(MDSContext *c, uint64_t log_seq, int op_prio)
{
- dout(10) << __func__ << " log_seq " << log_seq << dendl;
+ dout(10) << __func__ << " log_seq " << log_seq << " committing_log_seq:"
+ << committing_log_seq << dendl;
ceph_assert(num_pending_commit == 0);
num_pending_commit++;
void commit(MDSContext *c, uint64_t log_seq, int op_prio);
uint64_t get_committed_log_seq() const { return committed_log_seq; }
- uint64_t get_committing_log_seq() const { return committing_log_seq; }
bool is_any_committing() const { return num_pending_commit > 0; }
void load(MDSContext *c);