Commit 67597ce2 authored by Niu Yawei's avatar Niu Yawei Committed by Greg Kroah-Hartman

staging: lustre: ptlrpc: set proper mbits for EINPROGRESS resend

Set mbits for EINPROGRESS resend in ptl_send_rpc().
Signed-off-by: default avatarNiu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8193
Reviewed-on: http://review.whamcloud.com/20377Reviewed-by: default avatarLiang Zhen <liang.zhen@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 198a49a9
...@@ -3123,8 +3123,11 @@ void ptlrpc_set_bulk_mbits(struct ptlrpc_request *req) ...@@ -3123,8 +3123,11 @@ void ptlrpc_set_bulk_mbits(struct ptlrpc_request *req)
req->rq_mbits = ptlrpc_next_xid(); req->rq_mbits = ptlrpc_next_xid();
} else { } else {
/* old version transfers rq_xid to peer as matchbits */ /* old version transfers rq_xid to peer as matchbits */
req->rq_mbits = ptlrpc_next_xid(); spin_lock(&req->rq_import->imp_lock);
req->rq_xid = req->rq_mbits; list_del_init(&req->rq_unreplied_list);
ptlrpc_assign_next_xid_nolock(req);
req->rq_mbits = req->rq_xid;
spin_unlock(&req->rq_import->imp_lock);
} }
CDEBUG(D_HA, "resend bulk old x%llu new x%llu\n", CDEBUG(D_HA, "resend bulk old x%llu new x%llu\n",
......
...@@ -522,13 +522,14 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) ...@@ -522,13 +522,14 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
*/ */
spin_lock(&imp->imp_lock); spin_lock(&imp->imp_lock);
ptlrpc_assign_next_xid_nolock(request); ptlrpc_assign_next_xid_nolock(request);
request->rq_mbits = request->rq_xid;
min_xid = ptlrpc_known_replied_xid(imp); min_xid = ptlrpc_known_replied_xid(imp);
spin_unlock(&imp->imp_lock); spin_unlock(&imp->imp_lock);
lustre_msg_set_last_xid(request->rq_reqmsg, min_xid); lustre_msg_set_last_xid(request->rq_reqmsg, min_xid);
DEBUG_REQ(D_RPCTRACE, request, "Allocating new xid for resend on EINPROGRESS"); DEBUG_REQ(D_RPCTRACE, request, "Allocating new xid for resend on EINPROGRESS");
} else if (request->rq_bulk) { }
if (request->rq_bulk) {
ptlrpc_set_bulk_mbits(request); ptlrpc_set_bulk_mbits(request);
lustre_msg_set_mbits(request->rq_reqmsg, request->rq_mbits); lustre_msg_set_mbits(request->rq_reqmsg, request->rq_mbits);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment