debug_mds: 1,
debug_mds_balancer: 1,
debug_mds_log: 1,
+ debug_mds_log_expire: 1,
debug_mds_migrator: 1,
debug_buffer: 0,
debug_timer: 0,
g_conf.debug_mds_log = atoi(args[++i]);
else
g_debug_after_conf.debug_mds_log = atoi(args[++i]);
+ else if (strcmp(args[i], "--debug_mds_log_expire") == 0)
+ if (!g_conf.debug_after)
+ g_conf.debug_mds_log_expire = atoi(args[++i]);
+ else
+ g_debug_after_conf.debug_mds_log_expire = atoi(args[++i]);
else if (strcmp(args[i], "--debug_mds_migrator") == 0)
if (!g_conf.debug_after)
g_conf.debug_mds_migrator = atoi(args[++i]);
int debug_mds;
int debug_mds_balancer;
int debug_mds_log;
+ int debug_mds_log_expire;
int debug_mds_migrator;
int debug_buffer;
int debug_timer;
if (mds->get_nodeid() == 0)
beat_epoch++;
- // load
+ // my load
mds_load_t load = get_load();
mds_load[ mds->get_nodeid() ] = load;
//dout(0) << " load is " << load << " have " << mds_load.size() << dendl;
- unsigned cluster_size = mds->get_mds_map()->get_num_mds();
+ unsigned cluster_size = mds->get_mds_map()->get_num_in_mds();
if (mds_load.size() == cluster_size) {
// let's go!
//export_empties(); // no!
#include "config.h"
-#define dout(l) if (l<=g_conf.debug_mds || l <= g_conf.debug_mds_log) *_dout << dbeginl << g_clock.now() << " mds" << mds->get_nodeid() << ".journal "
-#define derr(l) if (l<=g_conf.debug_mds || l <= g_conf.debug_mds_log) *_dout << dbeginl << g_clock.now() << " mds" << mds->get_nodeid() << ".journal "
+#define dout(l) if (l<=g_conf.debug_mds || l <= g_conf.debug_mds_log || l <= g_conf.debug_mds_log_expire) *_dout << dbeginl << g_clock.now() << " mds" << mds->get_nodeid() << ".journal "
+#define derr(l) if (l<=g_conf.debug_mds || l <= g_conf.debug_mds_log || l <= g_conf.debug_mds_log_expire) *_dout << dbeginl << g_clock.now() << " mds" << mds->get_nodeid() << ".journal "
// -----------------------
++p) {
CDir *dir = *p;
if (dir->can_auth_pin()) {
- dout(10) << "try_to_expire committing " << *dir << dendl;
+ dout(15) << "try_to_expire committing " << *dir << dendl;
dir->commit(0, gather->new_sub());
} else {
- dout(10) << "try_to_expire waiting for unfreeze on " << *dir << dendl;
+ dout(15) << "try_to_expire waiting for unfreeze on " << *dir << dendl;
dir->add_waiter(CDir::WAIT_UNFREEZE, gather->new_sub());
}
}
// clientmap
if (clientmapv > mds->clientmap.get_committed()) {
- dout(10) << "try_to_expire saving clientmap, need " << clientmapv << dendl;
+ dout(10) << "try_to_expire saving clientmap, need " << clientmapv
+ << ", committed is " << mds->clientmap.get_committed()
+ << " (" << mds->clientmap.get_committing() << ")"
+ << dendl;
if (!gather) gather = new C_Gather;
mds->clientmap.save(gather->new_sub(), clientmapv);
}
}
+
+#undef dout
+#undef derr
+#define dout(l) if (l<=g_conf.debug_mds || l <= g_conf.debug_mds_log) *_dout << dbeginl << g_clock.now() << " mds" << mds->get_nodeid() << ".journal "
+#define derr(l) if (l<=g_conf.debug_mds || l <= g_conf.debug_mds_log) *_dout << dbeginl << g_clock.now() << " mds" << mds->get_nodeid() << ".journal "
+
+
// -----------------------
// EString
class MLock : public Message {
- int asker; // who is initiating this request
- int action; // action type
+ int32_t action; // action type
+ int32_t asker; // who is initiating this request
metareqid_t reqid; // for remote lock requests
char lock_type; // lock object type
MDSCacheObjectInfo &get_object_info() { return object_info; }
MLock() {}
- MLock(int action, int asker) :
- Message(MSG_MDS_LOCK) {
- this->action = action;
- this->asker = asker;
- }
- MLock(SimpleLock *lock, int action, int asker) :
- Message(MSG_MDS_LOCK) {
- this->lock_type = lock->get_type();
+ MLock(int ac, int as) :
+ Message(MSG_MDS_LOCK),
+ action(ac), asker(as),
+ lock_type(0) { }
+ MLock(SimpleLock *lock, int ac, int as) :
+ Message(MSG_MDS_LOCK),
+ action(ac), asker(as),
+ lock_type(lock->get_type()) {
lock->get_parent()->set_object_info(object_info);
- this->action = action;
- this->asker = asker;
}
- MLock(SimpleLock *lock, int action, int asker, bufferlist& bl) :
- Message(MSG_MDS_LOCK) {
- this->lock_type = lock->get_type();
+ MLock(SimpleLock *lock, int ac, int as, bufferlist& bl) :
+ Message(MSG_MDS_LOCK),
+ action(ac), asker(as), lock_type(lock->get_type()) {
lock->get_parent()->set_object_info(object_info);
- this->action = action;
- this->asker = asker;
data.claim(bl);
}
virtual char *get_type_name() { return "ILock"; }