From: ericm Date: Mon, 22 Jun 2009 19:44:51 +0000 (+0000) Subject: branch: HEAD X-Git-Tag: v1_9_220~114 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=9e600bb2abe539079d35f720e20fa5682710278c branch: HEAD server save opc in replay_state thus we don't need to access repmsg after reply being submmitted to ptlrpc. b=19386 r=wangdi r=fanyong --- diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 18d0df0..32b0291 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -272,6 +272,7 @@ struct ptlrpc_reply_state { unsigned long rs_prealloc:1; /* rs from prealloc list */ int rs_size; + __u32 rs_opc; __u64 rs_transno; __u64 rs_xid; struct obd_export *rs_export; diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 32d9a4d..3391807 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -2186,6 +2186,7 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id) rs->rs_xid = req->rq_xid; rs->rs_transno = req->rq_transno; rs->rs_export = exp; + rs->rs_opc = lustre_msg_get_opc(rs->rs_msg); spin_lock(&exp->exp_uncommitted_replies_lock); CDEBUG(D_NET, "rs transno = "LPU64", last committed = "LPU64"\n", diff --git a/lustre/mdt/mdt_recovery.c b/lustre/mdt/mdt_recovery.c index 0d794a1..0fa48af 100644 --- a/lustre/mdt/mdt_recovery.c +++ b/lustre/mdt/mdt_recovery.c @@ -1013,12 +1013,11 @@ static void mdt_steal_ack_locks(struct ptlrpc_request *req) if (oldrep->rs_xid != req->rq_xid) continue; - if (lustre_msg_get_opc(oldrep->rs_msg) != - lustre_msg_get_opc(req->rq_reqmsg)) + if (oldrep->rs_opc != lustre_msg_get_opc(req->rq_reqmsg)) CERROR ("Resent req xid "LPU64" has mismatched opc: " "new %d old %d\n", req->rq_xid, lustre_msg_get_opc(req->rq_reqmsg), - lustre_msg_get_opc(oldrep->rs_msg)); + oldrep->rs_opc); svc = oldrep->rs_service; spin_lock (&svc->srv_lock); @@ -1028,8 +1027,7 @@ static void mdt_steal_ack_locks(struct ptlrpc_request *req) CWARN("Stealing %d locks from rs %p x"LPD64".t"LPD64 " o%d NID %s\n", oldrep->rs_nlocks, oldrep, - oldrep->rs_xid, oldrep->rs_transno, - lustre_msg_get_opc(oldrep->rs_msg), + oldrep->rs_xid, oldrep->rs_transno, oldrep->rs_opc, libcfs_nid2str(exp->exp_connection->c_peer.nid)); for (i = 0; i < oldrep->rs_nlocks; i++) diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index ba0dffa..bae2756 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -1684,8 +1684,7 @@ ptlrpc_handle_rs (struct ptlrpc_reply_state *rs) CWARN("All locks stolen from rs %p x"LPD64".t"LPD64 " o%d NID %s\n", rs, - rs->rs_xid, rs->rs_transno, - lustre_msg_get_opc(rs->rs_msg), + rs->rs_xid, rs->rs_transno, rs->rs_opc, libcfs_nid2str(exp->exp_connection->c_peer.nid)); }