void Client::handle_osd_update(MOSDUpdate *m) {
hash_t my_hash = m->get_hash();
- cout << "Client::handle_osd_request Received a request to resolve group " << my_hash << endl;
// if we dont have it cached, ask mds
// this will lose execution control
// is anyone else already waiting for this hash?
if (update_waiter_osd.count(my_hash) == 0) {
- cout << "mds_group_update for " << my_hash << endl;
dout(10) << "mds_group_update for " << my_hash << endl;
// FIXME choose mds (always choose 0)
messenger->send_message(update, mdsmap->get_inst(0), MDS_PORT_SERVER);
}
else {
- cout << "mds_group_update for " << my_hash << endl;
dout(10) << "mds_group_update for " << my_hash << endl;
}
void Client::handle_client_update_reply(MClientUpdateReply *m) {
hash_t my_hash = m->get_user_hash();
- cout << "Client::handle_client_update_reply for " << my_hash << endl;
// cache the list
groups[my_hash].set_list(m->get_user_list());
// security operations
// checks that the access rights in the cap are correct
-bool OSD::check_request(MOSDOp *op, ExtCap *op_capability) {
+inline bool OSD::check_request(MOSDOp *op, ExtCap *op_capability) {
if (op_capability->get_type() == UNIX_GROUP ||
op_capability->get_type() == BATCH) {
// store the new list into group
hash_t my_hash = m->get_user_hash();
- cout << "hande_osd_update_reply for " << my_hash << endl;
dout(10) << "hande_osd_update_reply for " << my_hash << endl;
// verify
}
// assumes the request and cap contents has already been checked
-bool OSD::verify_cap(ExtCap *cap) {
+inline bool OSD::verify_cap(ExtCap *cap) {
// have i already verified this cap?
if (!cap_cache->prev_verified(cap->get_id())) {
if (cap->verif_extcap(monmap->get_key())) {
utime_t justver_time_end = g_clock.now();
cout << "Just verification time " << justver_time_end - justver_time_start << endl;
- utime_t cachecap_time_start = g_clock.now();
+
// cache the verification
cap_cache->insert(cap);
- utime_t cachecap_time_end = g_clock.now();
- cout << "Caching cap time " << cachecap_time_end - cachecap_time_start << endl;
-
}
else
return false;
}
utime_t hash_time_end = g_clock.now();
cout << "wr Hash check time " << hash_time_end - hash_time_start << endl;
+ cout << "Hash time SO FAR " << hash_time_end - sec_time_start << endl;
utime_t perm_time_start = g_clock.now();
// check accesses are right
dout(3) << "Access permissions are incorrect" << endl;
utime_t perm_time_end = g_clock.now();
cout << "wr Check permissions time " << perm_time_end - perm_time_start << endl;
+ cout << "Check permissions time SO FAR " << perm_time_end - sec_time_start << endl;
utime_t verif_time_start = g_clock.now();
assert(verify_cap(op_capability));
utime_t verif_time_end = g_clock.now();
cout << "wr Verif capability time " << verif_time_end - verif_time_start << endl;
+ cout << "Verification time SO FAR " << verif_time_end - sec_time_start << endl;
}
}