Whamcloud - gitweb
LU-5312 fld: retry fld rpc until the import is closed 39/11039/2
authorWang Di <di.wang@intel.com>
Wed, 9 Jul 2014 14:50:13 +0000 (07:50 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 15 Jul 2014 03:16:23 +0000 (03:16 +0000)
Since LWP is not replayable, it should retry RPC until
the import is closed, otherwise it would cause unnecessary
failure of the application.

Change-Id: I66d52fefe472ff2b139aa74f837e32a1403c3b2a
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/11039
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/fld/fld_request.c

index 4b402cb..1ca31c0 100644 (file)
@@ -436,12 +436,10 @@ again:
        rc = ptlrpc_queue_wait(req);
        obd_put_request_slot(&exp->exp_obd->u.cli);
        if (rc != 0) {
-               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 */
+               if (imp->imp_state != LUSTRE_IMP_CLOSED) {
+                       /* Since LWP is not replayable, so it will keep
+                        * trying unless umount happens, otherwise it would
+                        * cause unecessary failure of the application. */
                        ptlrpc_req_finished(req);
                        rc = 0;
                        goto again;