From: wang di Date: Wed, 7 May 2014 22:16:55 +0000 (-0700) Subject: LU-4420 fld: retry fld rpc even for ESHUTDOWN X-Git-Tag: 2.5.59~16 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=d335e310d4bf490509998ddbb1824e38cff20998 LU-4420 fld: retry fld rpc even for ESHUTDOWN when LWP is being evicted, because it is not replayable, the request might return ESHUTDOWN or EWOULDBLOCK, instead of failed, which might cause application failure, fld client will retry RPC, until the connection is being setup again or the LWP is being closed. Signed-off-by: wang di Change-Id: Iea0480a9ceae455834768e18545796f26f3cef0b Reviewed-on: http://review.whamcloud.com/10285 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Fan Yong Reviewed-by: Johann Lombardi --- diff --git a/lustre/fld/fld_request.c b/lustre/fld/fld_request.c index 806a090..4b402cb 100644 --- a/lustre/fld/fld_request.c +++ b/lustre/fld/fld_request.c @@ -436,12 +436,12 @@ again: rc = ptlrpc_queue_wait(req); obd_put_request_slot(&exp->exp_obd->u.cli); if (rc != 0) { - if (rc == -EWOULDBLOCK) { - /* For no_delay req(see above), EWOULDBLOCK means the - * connection is being evicted, but this seq lookup - * should not return error, since it would cause - * unecessary failure of the application, instead - * it should retry here */ + if (rc == -EWOULDBLOCK || rc == -ESHUTDOWN) { + /* For no_delay req(see above), EWOULDBLOCK and + * ESHUTDOWN means the connection is being evicted, + * but this seq lookup should not return error, + * since it would cause unecessary failure of the + * application, instead it should retry here */ ptlrpc_req_finished(req); rc = 0; goto again;