Whamcloud - gitweb
LU-4420 fld: retry fld rpc even for ESHUTDOWN 85/10285/2
authorwang di <di.wang@intel.com>
Wed, 7 May 2014 22:16:55 +0000 (15:16 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 13 May 2014 01:56:35 +0000 (01:56 +0000)
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 <di.wang@intel.com>
Change-Id: Iea0480a9ceae455834768e18545796f26f3cef0b
Reviewed-on: http://review.whamcloud.com/10285
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
lustre/fld/fld_request.c

index 806a090..4b402cb 100644 (file)
@@ -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;