From: wang di Date: Thu, 27 Oct 2016 22:11:48 +0000 (-0400) Subject: staging: lustre: ptlrpc: Do not resend req with allow_replay X-Git-Tag: v4.10-rc1~148^2~392 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f0a3b550207d3eb2d471772e87e3ab885f7e57c5;p=karo-tx-linux.git 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: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6780 Reviewed-on: http://review.whamcloud.com/15458 Reviewed-by: Alex Zhuravlev Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/ptlrpc/recover.c b/drivers/staging/lustre/lustre/ptlrpc/recover.c index 405faf0dc9fc..aa9653498044 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/recover.c +++ b/drivers/staging/lustre/lustre/ptlrpc/recover.c @@ -194,7 +194,13 @@ int ptlrpc_resend(struct obd_import *imp) LASSERTF((long)req > PAGE_SIZE && req != LP_POISON, "req %p bad\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); } spin_unlock(&imp->imp_lock);