Commit f0a3b550 authored by wang di's avatar wang di Committed by Greg Kroah-Hartman

staging: lustre: ptlrpc: Do not resend req with allow_replay

If the request is allowed to be sent during recovery,
and it is not timeout yet, then we do not need to
resend it in the final stage of recovery.

Unnecessary resend will cause the bulk request to resend the
request with different mbit, but same xid, and on the remote
server side, it will drop such request with same xid, so it
will never get the bulk in this case.
Signed-off-by: default avatarwang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6780
Reviewed-on: http://review.whamcloud.com/15458Reviewed-by: default avatarAlex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: default avatarLiang Zhen <liang.zhen@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 d1fc93b7
...@@ -194,7 +194,13 @@ int ptlrpc_resend(struct obd_import *imp) ...@@ -194,7 +194,13 @@ int ptlrpc_resend(struct obd_import *imp)
LASSERTF((long)req > PAGE_SIZE && req != LP_POISON, LASSERTF((long)req > PAGE_SIZE && req != LP_POISON,
"req %p bad\n", req); "req %p bad\n", req);
LASSERTF(req->rq_type != LI_POISON, "req %p freed\n", req); LASSERTF(req->rq_type != LI_POISON, "req %p freed\n", req);
if (!ptlrpc_no_resend(req))
/*
* If the request is allowed to be sent during replay and it
* is not timeout yet, then it does not need to be resent.
*/
if (!ptlrpc_no_resend(req) &&
(req->rq_timedout || !req->rq_allow_replay))
ptlrpc_resend_req(req); ptlrpc_resend_req(req);
} }
spin_unlock(&imp->imp_lock); spin_unlock(&imp->imp_lock);
......
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