#define KEY_NEXT_ID "next_id"
#define KEY_READ_ONLY "read-only"
#define KEY_REGISTER_TARGET "register_target"
-#define KEY_REVIMP_UPD "revimp_update"
#define KEY_SET_FS "set_fs"
#define KEY_TGT_COUNT "tgt_count"
/* KEY_SET_INFO in lustre_idl.h */
}
cfs_spin_lock(&export->exp_lock);
- if (export->exp_imp_reverse != NULL) {
+ if (export->exp_imp_reverse != NULL)
/* destroyed import can be still referenced in ctxt */
- obd_set_info_async(req->rq_svc_thread->t_env, export,
- sizeof(KEY_REVIMP_UPD), KEY_REVIMP_UPD,
- 0, NULL, NULL);
tmp_imp = export->exp_imp_reverse;
- }
export->exp_imp_reverse = revimp;
cfs_spin_unlock(&export->exp_lock);
ptlrpc_req_finished(req);
continue;
} else if (rc != ELDLM_OK) {
- CERROR("Got rc %d from cancel RPC: canceling "
- "anyway\n", rc);
+ if (rc != -ESHUTDOWN)
+ CERROR("Got rc %d from cancel RPC: canceling "
+ "anyway\n", rc);
break;
}
sent = count;
}
if (res < 0) {
- CERROR("ldlm_cli_cancel_list: %d\n", res);
+ if (res != -ESHUTDOWN)
+ CERROR("ldlm_cli_cancel_list: %d\n", res);
res = count;
}
if (cld_is_sptlrpc(cld)) {
rc = mgc_process_log(obd, cld);
- if (rc)
+ if (rc && rc != -ENOENT)
CERROR("failed processing sptlrpc log: %d\n", rc);
}
LASSERT(!(rc & LDD_F_NEED_INDEX));
/* keep only LDD flags */
mti->mti_flags = lsi->lsi_flags & LDD_F_MASK;
- mti->mti_flags |= LDD_F_UPDATE;
+ if (mti->mti_flags & (LDD_F_WRITECONF | LDD_F_VIRGIN))
+ mti->mti_flags |= LDD_F_UPDATE;
strncpy(mti->mti_params, lsi->lsi_lmd->lmd_params,
sizeof(mti->mti_params));
return 0;
}
}
- CWARN("%s: %u groups initialized\n",
+ CDEBUG(D_OTHER, "%s: %u groups initialized\n",
ofd_obd(ofd)->obd_name, ofd->ofd_max_group + 1);
cleanup:
RETURN(rc);
(void)ptlrpc_pinger_del_import(imp);
rc = ptlrpc_disconnect_import(imp, 0);
- if (rc && rc != -ETIMEDOUT)
+ if (rc == -ETIMEDOUT || rc == -ENOTCONN || rc == -ESHUTDOWN)
+ rc = 0;
+ if (rc)
CERROR("%s: can't disconnect: rc = %d\n",
d->opd_obd->obd_name, rc);
ldlm_namespace_cleanup(obd->obd_namespace, LDLM_FL_LOCAL_ONLY);
break;
case IMP_EVENT_OCD:
+ case IMP_EVENT_DEACTIVATE:
+ case IMP_EVENT_ACTIVATE:
break;
default:
CERROR("%s: unsupported import event: %#x\n",
ENTRY;
ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
- if (ctxt == NULL) {
- CERROR("missing llog context\n");
+ if (ctxt == NULL)
RETURN(-EINVAL);
- }
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);