From: tianzy Date: Mon, 14 Jan 2008 07:42:58 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_7_0_51~321 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=301b5e5768c5837962e06f1ec97beace0db965f8 Branch HEAD when mgs is rebooting or recovering, the mount req issued by mgc will fail because mgs doesn't do recovery for mgc at all. The solution is: in this situation, mgc will resend the req. b=13464 i=nathan i=adilger --- diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index e85a7f8..ba49a3f 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -550,6 +550,9 @@ static int ptlrpc_import_delay_req(struct obd_import *imp, imp->imp_state == LUSTRE_IMP_CONNECTING) { /* allow CONNECT even if import is invalid */ ; } else if (imp->imp_invalid) { + /* if it is mgc, wait for recovry. b=13464 */ + if (imp->imp_recon_bk && !imp->imp_obd->obd_no_recov) + delay = 1; /* If the import has been invalidated (such as by an OST * failure) the request must fail with -ESHUTDOWN. This * indicates the requests should be discarded; an -EIO @@ -1617,8 +1620,8 @@ int ptlrpc_queue_wait(struct ptlrpc_request *req) req->rq_phase = RQ_PHASE_RPC; spin_lock(&imp->imp_lock); - req->rq_import_generation = imp->imp_generation; restart: + req->rq_import_generation = imp->imp_generation; if (ptlrpc_import_delay_req(imp, req, &rc)) { list_del(&req->rq_list);