From: nathan Date: Wed, 23 Nov 2005 19:50:31 +0000 (+0000) Subject: Branch b1_4_mountconf X-Git-Tag: v1_8_0_110~486^4~126 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=471aa67eb70f904d9cbf0d5bd848feca4aa618df;p=fs%2Flustre-release.git Branch b1_4_mountconf b=8007 add imp->imp_initial_recov_bk flag: retry/recov until all connections have been tried, then give up. --- diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index b6c7f43..f6587f8 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -345,7 +345,7 @@ int lustre_get_process_log(struct super_block *sb, char *profile, struct lustre_handle mgc_conn = {0, }; struct obd_export *exp = NULL; struct llog_ctxt *rctxt, *lctxt; - int allow_recov = 0; + int recov_bk = 1; int rc; LASSERT(mgc); @@ -363,10 +363,12 @@ int lustre_get_process_log(struct super_block *sb, char *profile, /* Don't retry if connect fails */ rc = obd_set_info(mgc->obd_self_export, - strlen("initial_recov"), "initial_recov", - sizeof(allow_recov), &allow_recov); - if (rc) + strlen("init_recov_bk"), "init_recov_bk", + sizeof(recov_bk), &recov_bk); + if (rc) { + CERROR("can't set init_recov_bk %d\n", rc); goto out; + } rc = obd_connect(&mgc_conn, mgc, &(mgc->obd_uuid), NULL); if (rc) { diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 7c63ae6..029e13f 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -355,6 +355,18 @@ int ptlrpc_connect_import(struct obd_import *imp, char * new_uuid) if (rc) GOTO(out, rc); + if (imp->imp_initial_recov_bk && initial_connect && + /* last in list */ + (imp->imp_conn_current->oic_item.next == &imp->imp_conn_list)) { + CERROR("Last connection (%d) for %s, turning off init_recov\n", + imp->imp_conn_cnt, imp->imp_target_uuid.uuid); + /* Don't retry if connect fails */ + rc = 0; + obd_set_info(obd->obd_self_export, + strlen("initial_recov"), "initial_recov", + sizeof(rc), &rc); + } + rc = obd_reconnect(imp->imp_obd->obd_self_export, obd, &obd->obd_uuid, &imp->imp_connect_data); if (rc)