assert(ob->last_ack_tid < tid);
ob->last_ack_tid = tid;
- // is the entire object set now clean?
- if (flush_set_callback &&
- dirty_tx_by_ino[ob->get_ino()] == 0) {
- flush_set_callback(flush_set_callback_arg, ob->get_ino());
- dirty_tx_by_ino.erase(ob->get_ino());
- }
-
// waiters?
if (ob->waitfor_ack.count(tid)) {
list<Context*> ls;
ob->waitfor_ack.erase(tid);
finish_contexts(ls);
}
+
+ // is the entire object set now clean?
+ if (flush_set_callback &&
+ dirty_tx_by_ino[ob->get_ino()] == 0) {
+ flush_set_callback(flush_set_callback_arg, ob->get_ino());
+ dirty_tx_by_ino.erase(ob->get_ino());
+ }
}
//lock.Unlock();
}
// update last_commit.
ob->last_commit_tid = tid;
+ // waiters?
+ if (ob->waitfor_commit.count(tid)) {
+ list<Context*> ls;
+ ls.splice(ls.begin(), ob->waitfor_commit[tid]);
+ ob->waitfor_commit.erase(tid);
+ finish_contexts(ls);
+ }
+
// is the entire object set now clean and fully committed?
if (commit_set_callback &&
ob->last_commit_tid == ob->last_write_tid) {
commit_set_callback(flush_set_callback_arg, ob->get_ino());
}
}
-
- // waiters?
- if (ob->waitfor_commit.count(tid)) {
- list<Context*> ls;
- ls.splice(ls.begin(), ob->waitfor_commit[tid]);
- ob->waitfor_commit.erase(tid);
- finish_contexts(ls);
- }
}
// lock.Unlock();