LASSERT(mdt_object_remote(o));
- LASSERT(ibits == MDS_INODELOCK_UPDATE);
-
fid_build_reg_res_name(fid, res_id);
memset(einfo, 0, sizeof(*einfo));
LASSERT(mdt_seq_site(mdt)->ss_node_id != 0);
- if (!likely(fld->lsf_new))
- RETURN(0);
-
rc = lu_env_init(&env, LCT_MD_THREAD);
- if (rc) {
+ if (rc < 0) {
CERROR("%s: cannot init env: rc = %d\n", mdt_obd_name(mdt), rc);
RETURN(rc);
}
- rc = fld_update_from_controller(&env, fld);
- if (rc != 0) {
- CERROR("%s: cannot update controller: rc = %d\n",
- mdt_obd_name(mdt), rc);
+ /* Allocate new sequence now to avoid creating local transaction
+ * in the normal transaction process */
+ rc = seq_server_check_and_alloc_super(&env,
+ mdt_seq_site(mdt)->ss_server_seq);
+ if (rc < 0)
GOTO(out, rc);
+
+ if (fld->lsf_new) {
+ rc = fld_update_from_controller(&env, fld);
+ if (rc != 0) {
+ CERROR("%s: cannot update controller: rc = %d\n",
+ mdt_obd_name(mdt), rc);
+ GOTO(out, rc);
+ }
}
out:
lu_env_fini(&env);
}
LASSERT(!test_bit(MDT_FL_CFGLOG, &mdt->mdt_state));
+
target_recovery_init(&mdt->mdt_lut, tgt_request_handle);
set_bit(MDT_FL_CFGLOG, &mdt->mdt_state);
LASSERT(obd->obd_no_conn);
* at some point we should find a better one
*/
if (!test_bit(MDT_FL_SYNCED, &mdt->mdt_state) && data != NULL &&
- !(data->ocd_connect_flags & OBD_CONNECT_LIGHTWEIGHT)) {
+ !(data->ocd_connect_flags & OBD_CONNECT_LIGHTWEIGHT) &&
+ !(data->ocd_connect_flags & OBD_CONNECT_MDS_MDS)) {
rc = obd_get_info(env, mdt->mdt_child_exp,
sizeof(KEY_OSP_CONNECTED),
KEY_OSP_CONNECTED, NULL, NULL);
break;
case OBD_IOC_ABORT_RECOVERY:
CERROR("%s: Aborting recovery for device\n", mdt_obd_name(mdt));
+ obd->obd_force_abort_recovery = 1;
target_stop_recovery_thread(obd);
rc = 0;
break;