mirror of
https://github.com/ceph/ceph
synced 2025-04-01 14:51:13 +00:00
clean up stuff
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1284 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
parent
a67c29d277
commit
f396c4b642
@ -724,11 +724,14 @@ void Client::put_user_ticket(Ticket *tk)
|
||||
|
||||
void Client::handle_osd_update(MOSDUpdate *m) {
|
||||
|
||||
utime_t update_time_start = g_clock.now();
|
||||
|
||||
hash_t my_hash = m->get_hash();
|
||||
|
||||
// if we dont have it cached, ask mds
|
||||
// this will lose execution control
|
||||
if (groups.count(my_hash) == 0) {
|
||||
|
||||
MClientUpdate *update = new MClientUpdate(my_hash);
|
||||
|
||||
// is anyone else already waiting for this hash?
|
||||
@ -767,8 +770,6 @@ void Client::handle_client_update_reply(MClientUpdateReply *m) {
|
||||
groups[my_hash].set_root_hash(my_hash);
|
||||
groups[my_hash].set_sig(m->get_sig());
|
||||
|
||||
//MOSDUpdateReply *reply = new MOSDUpdateReply(my_hash, groups[my_hash].get_list(), m->get_sig());
|
||||
|
||||
// wake the waiters and send them all a reply
|
||||
for (set<int>::iterator oi = update_waiter_osd[my_hash].begin();
|
||||
oi != update_waiter_osd[my_hash].end();
|
||||
@ -2995,10 +2996,10 @@ int Client::write(fh_t fh, const char *buf, off_t size, off_t offset,
|
||||
bool lazy = f->mode == FILE_MODE_LAZY;
|
||||
|
||||
dout(10) << "cur file size is " << in->inode.size << " wr size " << in->file_wr_size << endl;
|
||||
|
||||
ExtCap *write_ext_cap = capcache->get_cache_cap(in->ino(), uid);
|
||||
assert(write_ext_cap);
|
||||
|
||||
|
||||
ExtCap *write_ext_cap = capcache->get_cache_cap(in->ino(), uid);
|
||||
assert(write_ext_cap);
|
||||
|
||||
// time it.
|
||||
utime_t start = g_clock.now();
|
||||
|
||||
|
@ -101,9 +101,7 @@ CInode::CInode(MDCache *c, bool auth) {
|
||||
batching = false;
|
||||
buffer_stop = false;
|
||||
buffer_thread = BufferThread(this);
|
||||
cout << "Starting buffer_thread.create()" << endl;
|
||||
buffer_thread.create();
|
||||
cout << "Buffer_thread created!" << endl;
|
||||
}
|
||||
|
||||
auth_pins = 0;
|
||||
@ -154,6 +152,7 @@ void CInode::buffer_entry()
|
||||
for (set<MClientRequest *>::iterator si = buffered_reqs.begin();
|
||||
si != buffered_reqs.end();
|
||||
si++) {
|
||||
cout << "Pushing " << (*si)->get_caller_uid() << " on to capability" << endl;
|
||||
user_set.push_back((*si)->get_caller_uid());
|
||||
users_hash.add_user((*si)->get_caller_uid());
|
||||
}
|
||||
|
@ -2299,8 +2299,6 @@ void Server::handle_client_open(MClientRequest *req,
|
||||
utime_t end_time;
|
||||
int flags = req->get_iarg();
|
||||
int mode = req->get_iarg2();
|
||||
//uid_t uid = req->get_caller_uid();
|
||||
//gid_t gid = req->get_caller_gid();
|
||||
|
||||
dout(7) << "open " << flags << " on " << *cur << endl;
|
||||
dout(10) << "open flags = " << flags << " mode = " << mode << endl;
|
||||
|
@ -382,9 +382,10 @@ inline bool OSD::check_request(MOSDOp *op, ExtCap *op_capability) {
|
||||
hash_t my_hash = op_capability->get_user_hash();
|
||||
|
||||
// now we should have the group, is the client in it?
|
||||
if (!(user_groups[my_hash].contains(op_capability->get_uid()))) {
|
||||
//if (!(user_groups[my_hash].contains(op_capability->get_uid()))) {
|
||||
if (!(user_groups[my_hash].contains(op->get_user()))) {
|
||||
// do update to get new unix groups
|
||||
cout << "User " << op_capability->get_uid() << " not in group "
|
||||
cout << "User " << op->get_user() << " not in group "
|
||||
<< my_hash << endl;
|
||||
return false;
|
||||
}
|
||||
@ -458,12 +459,6 @@ void OSD::handle_osd_update_reply(MOSDUpdateReply *m) {
|
||||
user_groups[my_hash].set_list(m->get_list());
|
||||
|
||||
// wait up the waiter(s)
|
||||
// this signals all update waiters
|
||||
//for (list<Cond*>::iterator p = update_waiter_cond[my_hash].begin();
|
||||
// p != update_waiter_cond[my_hash].end();
|
||||
// ++p) {
|
||||
//(*p)->Signal();
|
||||
//}
|
||||
take_waiters(update_waiter_op[my_hash]);
|
||||
|
||||
update_waiter_op.erase(my_hash);
|
||||
@ -3350,6 +3345,7 @@ void OSD::op_modify(MOSDOp *op, PG *pg)
|
||||
utime_t write_time_start;
|
||||
if (outstanding_updates.count(op->get_reqid()) != 0) {
|
||||
write_time_start = outstanding_updates[op->get_reqid()];
|
||||
outstanding_updates.erase(op->get_reqid());
|
||||
}
|
||||
else
|
||||
write_time_start = g_clock.now();
|
||||
@ -3380,7 +3376,7 @@ void OSD::op_modify(MOSDOp *op, PG *pg)
|
||||
// i know, i know...not secure but they should all have caps
|
||||
if (op->get_op() == OSD_OP_WRITE
|
||||
&& op->get_source().is_client()) {
|
||||
|
||||
|
||||
ExtCap *op_capability = op->get_capability();
|
||||
assert(op_capability);
|
||||
// if using groups...do we know group?
|
||||
|
Loading…
Reference in New Issue
Block a user