diff options
author | xie xingguo <xie.xingguo@zte.com.cn> | 2016-06-15 04:42:19 +0200 |
---|---|---|
committer | xie xingguo <xie.xingguo@zte.com.cn> | 2016-06-15 05:40:37 +0200 |
commit | 7344d974292bb4d48f972131c102ed0885450433 (patch) | |
tree | 6fc414d6738c93e6cc9dad0401d685f7c4d9f806 /src/mds | |
parent | mds/Mutation: avoid side-effect of slave_did_prepare() method (diff) | |
download | ceph-7344d974292bb4d48f972131c102ed0885450433.tar.xz ceph-7344d974292bb4d48f972131c102ed0885450433.zip |
Server: use req directly
We have req pointed to mdr->client_request already, so use
it directly to keep the bothering of a long dereference series of
pointer(which also results in a longer line) away.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Diffstat (limited to 'src/mds')
-rw-r--r-- | src/mds/Server.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mds/Server.cc b/src/mds/Server.cc index b6407b2b9b6..9ad51c924bb 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -1062,7 +1062,7 @@ void Server::early_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn) } - MClientReply *reply = new MClientReply(mdr->client_request, 0); + MClientReply *reply = new MClientReply(req, 0); reply->set_unsafe(); // mark xlocks "done", indicating that we are exposing uncommitted changes. @@ -1070,7 +1070,7 @@ void Server::early_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn) //_rename_finish() does not send dentry link/unlink message to replicas. // so do not set xlocks on dentries "done", the xlocks prevent dentries // that have projected linkages from getting new replica. - mds->locker->set_xlocks_done(mdr.get(), mdr->client_request->get_op() == CEPH_MDS_OP_RENAME); + mds->locker->set_xlocks_done(mdr.get(), req->get_op() == CEPH_MDS_OP_RENAME); dout(10) << "early_reply " << reply->get_result() << " (" << cpp_strerror(reply->get_result()) @@ -1083,8 +1083,7 @@ void Server::early_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn) mdr->cap_releases.erase(tracedn->get_dir()->get_inode()->vino()); set_trace_dist(mdr->session, reply, tracei, tracedn, mdr->snapid, - mdr->client_request->get_dentry_wanted(), - mdr); + req->get_dentry_wanted(), mdr); } reply->set_extra_bl(mdr->reply_extra_bl); @@ -1093,7 +1092,7 @@ void Server::early_reply(MDRequestRef& mdr, CInode *tracei, CDentry *tracedn) mdr->did_early_reply = true; mds->logger->inc(l_mds_reply); - utime_t lat = ceph_clock_now(g_ceph_context) - mdr->client_request->get_recv_stamp(); + utime_t lat = ceph_clock_now(g_ceph_context) - req->get_recv_stamp(); mds->logger->tinc(l_mds_reply_latency, lat); dout(20) << "lat " << lat << dendl; @@ -2725,7 +2724,7 @@ void Server::handle_client_getattr(MDRequestRef& mdr, bool is_lookup) mdr->getattr_caps = mask; mds->balancer->hit_inode(ceph_clock_now(g_ceph_context), ref, META_POP_IRD, - mdr->client_request->get_source().num()); + req->get_source().num()); // reply dout(10) << "reply to stat on " << *req << dendl; |