By the time target_send_reply() initializes rs_opc, rs_msg has not been
filled with a valid opc yet. Following Oleg's suggestion on the Jira
ticket, this patch changes target_send_reply() to initialize rs_opc with
rq_reqmsg instead and silences a couple of related warnings that are of
only informative nature.
Change-Id: I4b96454e0bcf3dd0dc8f21b0de70a89ce37faacf
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4271
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
rs->rs_xid = req->rq_xid;
rs->rs_transno = req->rq_transno;
rs->rs_export = exp;
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);
+ rs->rs_opc = lustre_msg_get_opc(req->rq_reqmsg);
cfs_spin_lock(&exp->exp_uncommitted_replies_lock);
CDEBUG(D_NET, "rs transno = "LPU64", last committed = "LPU64"\n",
cfs_spin_lock(&exp->exp_uncommitted_replies_lock);
CDEBUG(D_NET, "rs transno = "LPU64", last committed = "LPU64"\n",
cfs_list_del_init (&oldrep->rs_exp_list);
cfs_list_del_init (&oldrep->rs_exp_list);
- 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, oldrep->rs_opc,
- libcfs_nid2str(exp->exp_connection->c_peer.nid));
+ CDEBUG(D_HA, "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, oldrep->rs_opc,
+ libcfs_nid2str(exp->exp_connection->c_peer.nid));
for (i = 0; i < oldrep->rs_nlocks; i++)
ptlrpc_save_lock(req, &oldrep->rs_locks[i],
for (i = 0; i < oldrep->rs_nlocks; i++)
ptlrpc_save_lock(req, &oldrep->rs_locks[i],
if (nlocks == 0 && !been_handled) {
/* If we see this, we should already have seen the warning
* in mds_steal_ack_locks() */
if (nlocks == 0 && !been_handled) {
/* If we see this, we should already have seen the warning
* in mds_steal_ack_locks() */
- CWARN("All locks stolen from rs %p x"LPD64".t"LPD64
- " o%d NID %s\n",
- rs,
- rs->rs_xid, rs->rs_transno, rs->rs_opc,
- libcfs_nid2str(exp->exp_connection->c_peer.nid));
+ CDEBUG(D_HA, "All locks stolen from rs %p x"LPD64".t"LPD64
+ " o%d NID %s\n",
+ rs,
+ rs->rs_xid, rs->rs_transno, rs->rs_opc,
+ libcfs_nid2str(exp->exp_connection->c_peer.nid));
}
if ((!been_handled && rs->rs_on_net) || nlocks > 0) {
}
if ((!been_handled && rs->rs_on_net) || nlocks > 0) {