From 3c5a7f1bb0ba6dfa72db5d00d3da38348251b53a Mon Sep 17 00:00:00 2001 From: sage Date: Fri, 8 Jul 2005 06:16:37 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@423 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/client/Client.cc | 13 +++++++++++-- ceph/client/Client.h | 2 +- ceph/client/SyntheticClient.cc | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ceph/client/Client.cc b/ceph/client/Client.cc index d72c52fc2d1..55840a85ef7 100644 --- a/ceph/client/Client.cc +++ b/ceph/client/Client.cc @@ -300,7 +300,9 @@ Dentry *Client::lookup(filepath& path) // ------- -MClientReply *Client::make_request(MClientRequest *req, bool auth_best) +MClientReply *Client::make_request(MClientRequest *req, + bool auth_best, + int use_auth) // this param is icky! { // send to what MDS? find deepest known prefix Inode *cur = root; @@ -340,6 +342,10 @@ MClientReply *Client::make_request(MClientRequest *req, bool auth_best) dout(9) << "i have no idea where " << req->get_filepath() << " is" << endl; } + // force use of a particular mds auth? + if (use_auth >= 0) + mds = use_auth; + // drop mutex for duration of call client_lock.Unlock(); MClientReply *reply = (MClientReply*)messenger->sendrecv(req, @@ -1192,10 +1198,13 @@ int Client::close(fileh_t fh) fh_map.erase(fh); delete f; + // note mds auth.. we'll send the close there! FIXME this is sort of icky + int mds_auth = in->authority(); + release_inode_buffers(in); put_inode( in ); - MClientReply *reply = make_request(req, true); + MClientReply *reply = make_request(req, true, mds_auth); assert(reply); int result = reply->get_result(); dout(3) << "close " << fh << " result = " << result << endl; diff --git a/ceph/client/Client.h b/ceph/client/Client.h index 7502e676719..4d61d9e293e 100644 --- a/ceph/client/Client.h +++ b/ceph/client/Client.h @@ -268,7 +268,7 @@ class Client : public Dispatcher { // blocking mds call - MClientReply *make_request(MClientRequest *req, bool auth_best=false); + MClientReply *make_request(MClientRequest *req, bool auth_best=false, int use_auth=-1); // buffer cache diff --git a/ceph/client/SyntheticClient.cc b/ceph/client/SyntheticClient.cc index 084cdb17c31..9d2dda5f1a8 100644 --- a/ceph/client/SyntheticClient.cc +++ b/ceph/client/SyntheticClient.cc @@ -330,6 +330,7 @@ int SyntheticClient::play_trace(Trace& t, string& prefix) for (map<__int64_t, __int64_t>::iterator fi = open_files.begin(); fi != open_files.end(); fi++) { + dout(1) << "leftover close " << fi->second << endl; client->close(fi->second); }