From 934ed595e3e1e24086e26435ad59dc1058d2926d Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Wed, 20 Jan 2010 10:41:39 -0800 Subject: [PATCH] b=21448 send recovery rpc ASAP 1) send recovery rpc ASAP. 2) add more diagnostic information for RPC failure. i=robert.read i=tappro --- lustre/ptlrpc/import.c | 3 ++- lustre/ptlrpc/ptlrpcd.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 6e3c8ce..12a19db 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -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); - 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: diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c index 42e3716..e6bbf18 100644 --- a/lustre/ptlrpc/ptlrpcd.c +++ b/lustre/ptlrpc/ptlrpcd.c @@ -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. + * 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 @@ -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); + } 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; -- 1.8.3.1