OPTION(max_open_files, 0, OPT_LONGLONG, 0),
OPTION(debug, 0, OPT_INT, 0),
OPTION(debug_lockdep, 0, OPT_INT, 0),
+ OPTION(debug_context, 0, OPT_INT, 0),
OPTION(debug_mds, 0, OPT_INT, 1),
OPTION(debug_mds_balancer, 0, OPT_INT, 1),
OPTION(debug_mds_log, 0, OPT_INT, 1),
list<Context*> ls;
ls.swap(finished); // swap out of place to avoid weird loops
- generic_dout(10) << ls.size() << " contexts to finish with " << result << dendl;
+ cdout(context, 10) << ls.size() << " contexts to finish with " << result << dendl;
for (std::list<Context*>::iterator it = ls.begin();
it != ls.end();
it++) {
Context *c = *it;
- generic_dout(10) << "---- " << c << dendl;
+ cdout(context, 10) << "---- " << c << dendl;
c->finish(result);
delete c;
}
vector<Context*> ls;
ls.swap(finished); // swap out of place to avoid weird loops
- generic_dout(10) << ls.size() << " contexts to finish with " << result << dendl;
+ cdout(context, 10) << ls.size() << " contexts to finish with " << result << dendl;
for (std::vector<Context*>::iterator it = ls.begin();
it != ls.end();
it++) {
Context *c = *it;
- generic_dout(10) << "---- " << c << dendl;
+ cdout(context, 10) << "---- " << c << dendl;
c->finish(result);
delete c;
}
#endif
--sub_existing_count;
- //generic_dout(0) << "C_Gather " << this << ".sub_finish(r=" << r << ") " << sub << " " << dendl;
+ cdout(context, 10) << "C_Gather " << this << ".sub_finish(r=" << r << ") " << sub
+#ifdef DEBUG_GATHER
+ << " (remaining " << waitfor << ")"
+#endif
+ << dendl;
if (r < 0 && result == 0)
result = r;
lock("C_Gather::lock", true, false), //disable lockdep
any(an),
activated(onfinish ? true : false) {
- //generic_dout(0) << "C_Gather " << this << ".new" << dendl;
+ cdout(context, 10) << "C_Gather " << this << ".new" << dendl;
}
~C_Gather() {
- //generic_dout(0) << "C_Gather " << this << ".delete" << dendl;
+ cdout(context, 10) << "C_Gather " << this << ".delete" << dendl;
assert(sub_existing_count == 0);
#ifdef DEBUG_GATHER
assert(waitfor.empty());
#ifdef DEBUG_GATHER
waitfor.insert(s);
#endif
- //generic_dout(0) << "C_Gather " << this << ".new_sub is " << sub_created_count << " " << s << dendl;
+ cdout(context, 10) << "C_Gather " << this << ".new_sub is " << sub_created_count << " " << s << dendl;
return s;
}
void rm_sub(Context *s) {