static int config_log_get(struct config_llog_data *cld)
{
ENTRY;
- CDEBUG(D_MGC, "log %s refs %d\n", cld->cld_logname,
+ CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname,
atomic_read(&cld->cld_refcount));
atomic_inc(&cld->cld_refcount);
if (cld->cld_stopping) {
static void config_log_put(struct config_llog_data *cld)
{
ENTRY;
- CDEBUG(D_MGC, "log %s refs %d\n", cld->cld_logname,
+ CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname,
atomic_read(&cld->cld_refcount));
if (atomic_dec_and_test(&cld->cld_refcount)) {
CDEBUG(D_MGC, "dropping config log %s\n", cld->cld_logname);
imp->imp_deactive, imp->imp_invalid,
imp->imp_state);
/* can't put this in obdclass, module loop with ptlrpc*/
- /* remove 'invalid' flag */
+ /* This seems to be necessary when restarting a
+ combo mgs/mdt while the mgc is alive */
+ ptlrpc_invalidate_import(imp);
+ /* Remove 'invalid' flag */
ptlrpc_activate_import(imp);
- /* reconnect */
- ptlrpc_set_import_active(imp, 1);
- //ptlrpc_recover_import(imp);
+ /* Attempt a new connect */
+ ptlrpc_recover_import(imp, NULL);
}
RETURN(0);
}
int rc = 0;
LASSERT(imp->imp_obd == obd);
+ CDEBUG(D_MGC, "import event %d\n", event);
switch (event) {
case IMP_EVENT_INVALIDATE: {
setup does, because the lov/osc must clean up only when they are
done, not when the mdt is done. So instead, we just assume that
if the lov llogs are already set up then we must cleanup first. */
- CERROR("obd %s ctxt %d already set up\n", obd->obd_name, index);
+ CDEBUG(D_CONFIG, "obd %s ctxt %d already set up\n",
+ obd->obd_name, index);
llog_cleanup(obd->obd_llog_ctxt[index]);
}
}
/*
+ * Administratively active/deactive a client.
* This should only be called by the ioctl interface, currently
* with the lctl deactivate and activate commands.
*/
RETURN(rc);
}
+/* Attempt to reconnect an import */
int ptlrpc_recover_import(struct obd_import *imp, char *new_uuid)
{
int rc;
ENTRY;
spin_lock_irqsave(&imp->imp_lock, flags);
+ /* Check if reconnect is already in progress */
if (imp->imp_state != LUSTRE_IMP_DISCON) {
in_recovery = 1;
}