Whamcloud - gitweb
b=21448 send recovery rpc ASAP
authorFan Yong <Yong.Fan@Sun.COM>
Wed, 20 Jan 2010 18:41:39 +0000 (10:41 -0800)
committerRobert Read <rread@sun.com>
Wed, 20 Jan 2010 18:41:39 +0000 (10:41 -0800)
1) send recovery rpc ASAP.
2) add more diagnostic information for RPC failure.

i=robert.read
i=tappro

lustre/ptlrpc/import.c
lustre/ptlrpc/ptlrpcd.c

index 6e3c8ce..12a19db 100644 (file)
@@ -729,7 +729,8 @@ int ptlrpc_connect_import(struct obd_import *imp, char *new_uuid)
                 lustre_msg_add_op_flags(request->rq_reqmsg,
                                         MSG_CONNECT_TRANSNO);
 
                 lustre_msg_add_op_flags(request->rq_reqmsg,
                                         MSG_CONNECT_TRANSNO);
 
-        DEBUG_REQ(D_RPCTRACE, request, "(re)connect request");
+        DEBUG_REQ(D_RPCTRACE, request, "(re)connect request (timeout %d)",
+                  request->rq_timeout);
         ptlrpcd_add_req(request, PSCOPE_OTHER);
         rc = 0;
 out:
         ptlrpcd_add_req(request, PSCOPE_OTHER);
         rc = 0;
 out:
index 42e3716..e6bbf18 100644 (file)
@@ -141,7 +141,9 @@ int ptlrpcd_add_req(struct ptlrpc_request *req, enum ptlrpcd_scope scope)
         rc = ptlrpc_set_add_new_req(pc, req);
         /*
          * XXX disable this for CLIO: environment is needed for interpreter.
         rc = ptlrpc_set_add_new_req(pc, req);
         /*
          * XXX disable this for CLIO: environment is needed for interpreter.
+         *     add debug temporary to check rc.
          */
          */
+        LASSERTF(rc == 0, "ptlrpcd_add_req failed (rc = %d)\n", rc);
         if (rc && 0) {
                 /*
                  * Thread is probably in stop now so we need to
         if (rc && 0) {
                 /*
                  * Thread is probably in stop now so we need to
@@ -153,6 +155,11 @@ int ptlrpcd_add_req(struct ptlrpc_request *req, enum ptlrpcd_scope scope)
                 ptlrpc_req_interpret(NULL, req, -EBADR);
                 req->rq_set = NULL;
                 ptlrpc_req_finished(req);
                 ptlrpc_req_interpret(NULL, req, -EBADR);
                 req->rq_set = NULL;
                 ptlrpc_req_finished(req);
+        } else if (req->rq_send_state == LUSTRE_IMP_CONNECTING) {
+                /*
+                 * The request is for recovery, should be sent ASAP.
+                 */
+                cfs_waitq_signal(&pc->pc_set->set_waitq);
         }
 
         return rc;
         }
 
         return rc;