renewer_thread(this)
{
if (g_conf.renewal) {
- cleaner_thread.create();
+ //cleaner_thread.create();
renewer_thread.create();
}
}
renewer_stop = true;
if (g_conf.renewal) {
- cleaner_cond.Signal();
- cleaner_thread.join();
+ //cleaner_cond.Signal();
+ //cleaner_thread.join();
renewer_cond.Signal();
renewer_thread.join();
}
while (!renewer_stop) {
- cout << "Renewer running" << endl;
+ cout << "Renewer running, requesting ";
// renewal all open caps
MClientRenewal *renewal = new MClientRenewal();
for (map<uid_t, set<cap_id_t> >::iterator mi = caps_in_use.begin();
mi != caps_in_use.end();
mi++) {
renewal->add_cap_set(mi->second);
+ cout << mi->second << ", ";
}
+ cout << endl;
// make asynchronous renewal request
// FIXME always send to mds 0
myPrivKey = esignPrivKey("crypto/esig1023.dat");
myPubKey = esignPubKey(myPrivKey);
+ cap_cache_hits = 0;
+ cap_requests = 0;
+
// hard code the unix groups?
if (g_conf.preload_unix_groups) {
gid_t group_gid = 1020;
//cout << endl << "hash " << cgroup.get_root_hash() << endl;
}
-
+ /*
// create unix_groups from file?
if (g_conf.unix_group_file) {
ifstream from(g_conf.unix_group_file);
}
cout << "Done doing unix group crap" << endl;
}
+ */
// do prediction read-in
if (g_conf.mds_group == 4) {
bufferlist bl;
server->get_bl_ss(bl);
::_decode(sequence, bl, off);
- rp_predicter = RecentPopularity(sequence);
+ // set prediction sequence and parameters
+ rp_predicter = RecentPopularity(2, 6, sequence);
for (map<inodeno_t, deque<inodeno_t> >::iterator mi = sequence.begin();
mi != sequence.end();
dout(1) << "shutdown_start" << endl;
derr(0) << "mds shutdown start" << endl;
+ cout << "Cap cache hits " << cap_cache_hits << endl;
+ cout << "Cap requests " << cap_requests << endl;
+
// tell everyone to stop.
set<int> active;
mdsmap->get_active_mds_set(active);
public:
map<int,version_t> peer_mdsmap_epoch;
+
+ int cap_cache_hits;
+ int cap_requests;
// logical user group
//map<gid_t, CapGroup> unix_groups;
map<gid_t, hash_t> unix_groups_map;
// set up reply
MOSDUpdate *update = new MOSDUpdate(my_hash);
Cond cond;
+ //cout << "OSD Requesting list update" << endl;
// if no one has already requested the ticket
if (update_waiter_op.count(my_hash) == 0) {
if (g_conf.mds_group == 3) {
user_groups[my_hash].set_inode_list(m->get_file_list());
- cout << "Received a group update for " << my_hash << endl;
+ dout(3) << "Received a group update for " << my_hash << endl;
for (list<inodeno_t>::iterator ii = m->get_file_list().begin();
ii != m->get_file_list().end();
ii++) {
- cout << my_hash << " contains " << (*ii) << endl;
+ dout(3) << my_hash << " contains " << (*ii) << endl;
}
}
else
// have i already verified this cap?
if (!cap_cache->prev_verified(cap->get_id())) {
+ dout(10) << "OSD verifying new cap" << endl;
// actually verify
if (cap->verif_extcap(monmap->get_key())) {
// cache the verification
else
return false;
}
+ else
+ dout(10) << "OSD already cached cap" << endl;
return true;
}