From: Sage Weil Date: Fri, 1 Apr 2011 16:06:23 +0000 (-0700) Subject: mds: rename chained _lookup_hash_? methods X-Git-Tag: v0.27~181^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ff3ce1fd7759e3ba7d1d8680c9daea970fcf003;p=ceph.git mds: rename chained _lookup_hash_? methods Signed-off-by: Sage Weil --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 4a0fd08ad099..99ab9c35289f 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2042,12 +2042,12 @@ void Server::handle_client_lookup_parent(MDRequest *mdr) reply_request(mdr, 0, in, dn); // reply } -struct C_MDS_LookupHash : public Context { +struct C_MDS_LookupHash2 : public Context { Server *server; MDRequest *mdr; - C_MDS_LookupHash(Server *s, MDRequest *r) : server(s), mdr(r) {} + C_MDS_LookupHash2(Server *s, MDRequest *r) : server(s), mdr(r) {} void finish(int r) { - server->_lookup_hash(mdr, r); + server->_lookup_hash_2(mdr, r); } }; @@ -2083,7 +2083,7 @@ void Server::handle_client_lookup_hash(MDRequest *mdr) CInode *diri = mdcache->get_inode(dirino); if (!diri) { mdcache->find_ino_peers(dirino, - new C_MDS_LookupHash(this, mdr), -1); + new C_MDS_LookupHash2(this, mdr), -1); return; } if (diri->state_test(CInode::STATE_PURGING)) { @@ -2130,40 +2130,39 @@ void Server::handle_client_lookup_hash(MDRequest *mdr) reply_request(mdr, reply, in, in->get_parent_dn()); } -struct C_MDS_LookupHash2 : public Context { +struct C_MDS_LookupHash3 : public Context { Server *server; MDRequest *mdr; - C_MDS_LookupHash2(Server *s, MDRequest *r) : server(s), mdr(r) {} + C_MDS_LookupHash3(Server *s, MDRequest *r) : server(s), mdr(r) {} void finish(int r) { - server->_lookup_hash_2(mdr, r); + server->_lookup_hash_3(mdr, r); } }; -void Server::_lookup_hash(MDRequest *mdr, int r) +void Server::_lookup_hash_2(MDRequest *mdr, int r) { inodeno_t dirino = mdr->client_request->get_filepath2().get_ino(); - dout(10) << "_lookup_hash " << mdr << " checked peers for dirino " << dirino << " and got r=" << r << dendl; + dout(10) << "_lookup_hash_2 " << mdr << " checked peers for dirino " << dirino << " and got r=" << r << dendl; if (r == 0) { dispatch_client_request(mdr); return; } // okay fine, try the dir object then! - mdcache->find_ino_dir(dirino, new C_MDS_LookupHash2(this, mdr)); + mdcache->find_ino_dir(dirino, new C_MDS_LookupHash3(this, mdr)); } -void Server::_lookup_hash_2(MDRequest *mdr, int r) +void Server::_lookup_hash_3(MDRequest *mdr, int r) { inodeno_t dirino = mdr->client_request->get_filepath2().get_ino(); - dout(10) << "_lookup_hash_2 " << mdr << " checked dir object for dirino " << dirino + dout(10) << "_lookup_hash_3 " << mdr << " checked dir object for dirino " << dirino << " and got r=" << r << dendl; if (r == 0) { dispatch_client_request(mdr); return; } - dout(10) << "_lookup_hash_2 " << mdr << " trying the ino itself" << dendl; - _lookup_hash_ino(mdr); + dout(10) << "_lookup_hash_3 " << mdr << " trying the ino itself" << dendl; } struct C_MDS_LookupHashIno2 : public Context { diff --git a/src/mds/Server.h b/src/mds/Server.h index 24f0fcb7c67a..684dea8288f1 100644 --- a/src/mds/Server.h +++ b/src/mds/Server.h @@ -137,8 +137,8 @@ public: void handle_client_stat(MDRequest *mdr); void handle_client_lookup_parent(MDRequest *mdr); void handle_client_lookup_hash(MDRequest *mdr); - void _lookup_hash(MDRequest *mdr, int r); void _lookup_hash_2(MDRequest *mdr, int r); + void _lookup_hash_3(MDRequest *mdr, int r); void _lookup_hash_ino(MDRequest *mdr); void _lookup_hash_ino_2(MDRequest *mdr, int r); void _lookup_hash_ino_3(MDRequest *mdr, int r);