X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmgc%2Fmgc_request.c;h=dab90012cd47c8a3c46407aeef0f780d48e6cd8d;hb=b2f4fd040713bea3ad3d3f2540048c0ee8e07def;hp=39a56324a97adb84c6b265009af21ad2094ece1a;hpb=488f69f7e1fb55209ae65761f6e1a0fe9270587c;p=fs%2Flustre-release.git diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 39a5632..dab9001 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -92,7 +92,7 @@ int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id) } /********************** config llog list **********************/ -static struct list_head config_llog_list = LIST_HEAD_INIT(config_llog_list); +static CFS_LIST_HEAD(config_llog_list); static spinlock_t config_list_lock = SPIN_LOCK_UNLOCKED; /* Take a reference to a config log */ @@ -772,33 +772,6 @@ static int mgc_target_register(struct obd_export *exp, RETURN(rc); } -int mgc_reconnect_import(struct obd_import *imp) -{ - /* Force a new connect attempt */ - ptlrpc_invalidate_import(imp); - /* Do a fresh connect next time by zeroing the handle */ - ptlrpc_disconnect_import(imp, 1); - /* Wait for all invalidate calls to finish */ - if (atomic_read(&imp->imp_inval_count) > 0) { - int rc; - struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL); - rc = l_wait_event(imp->imp_recovery_waitq, - (atomic_read(&imp->imp_inval_count) == 0), - &lwi); - if (rc) - CERROR("Interrupted, inval=%d\n", - atomic_read(&imp->imp_inval_count)); - } - - /* Allow reconnect attempts */ - imp->imp_obd->obd_no_recov = 0; - /* Remove 'invalid' flag */ - ptlrpc_activate_import(imp); - /* Attempt a new connect */ - ptlrpc_recover_import(imp, NULL); - return 0; -} - int mgc_set_info_async(struct obd_export *exp, obd_count keylen, void *key, obd_count vallen, void *val, struct ptlrpc_request_set *set) @@ -837,7 +810,7 @@ int mgc_set_info_async(struct obd_export *exp, obd_count keylen, ptlrpc_import_state_name(imp->imp_state)); /* Resurrect if we previously died */ if (imp->imp_invalid || value > 1) - mgc_reconnect_import(imp); + ptlrpc_reconnect_import(imp); RETURN(0); } /* FIXME move this to mgc_process_config */ @@ -895,7 +868,6 @@ static int mgc_import_event(struct obd_device *obd, switch (event) { case IMP_EVENT_DISCON: /* MGC imports should not wait for recovery */ - ptlrpc_invalidate_import(imp); break; case IMP_EVENT_INACTIVE: break; @@ -1156,8 +1128,9 @@ static int mgc_process_log(struct obd_device *mgc, "\n", cld->cld_logname); GOTO(out_pop, rc = -ENOTCONN); } - LCONSOLE_WARN("Failed to get MGS log %s, using " - "local copy.\n", cld->cld_logname); + CDEBUG(D_MGC, "Failed to get MGS log %s, using local " + "copy for now, will try to update later.\n", + cld->cld_logname); } /* Now, whether we copied or not, start using the local llog. If we failed to copy, we'll start using whatever the old