}
if (reqbody->mbo_valid & OBD_MD_FLMODEASIZE) {
- repbody->mbo_max_cookiesize = 0;
repbody->mbo_max_mdsize = info->mti_mdt->mdt_max_mdsize;
repbody->mbo_valid |= OBD_MD_FLMODEASIZE;
- CDEBUG(D_INODE, "I am going to change the MAX_MD_SIZE & "
- "MAX_COOKIE to : %d:%d\n", repbody->mbo_max_mdsize,
- repbody->mbo_max_cookiesize);
+ CDEBUG(D_INODE, "changing the max MD size to %u\n",
+ repbody->mbo_max_mdsize);
}
if (exp_connect_rmtclient(info->mti_exp) &&
if (unlikely(IS_ERR(child)))
GOTO(out_parent, rc = PTR_ERR(child));
+ OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_RESEND, obd_timeout * 2);
rc = mdt_check_resent_lock(info, child, lhc);
if (rc < 0) {
GOTO(out_child, rc);
} else if (rc > 0) {
- OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_RESEND, obd_timeout*2);
mdt_lock_handle_init(lhc);
mdt_lock_reg_init(lhc, LCK_PR);
try_layout = false;
RETURN(err_serious(rc));
switch (oqctl->qc_cmd) {
- case Q_QUOTACHECK:
- case LUSTRE_Q_INVALIDATE:
- case LUSTRE_Q_FINVALIDATE:
- case Q_QUOTAON:
- case Q_QUOTAOFF:
- case Q_INITQUOTA:
- /* deprecated, not used any more */
- RETURN(-EOPNOTSUPP);
/* master quotactl */
case Q_SETINFO:
case Q_SETQUOTA:
LASSERT(mdt_object_remote(o));
- LASSERT(ibits == MDS_INODELOCK_UPDATE);
-
fid_build_reg_res_name(fid, res_id);
memset(einfo, 0, sizeof(*einfo));
if (OBD_FAIL_CHECK(OBD_FAIL_TGT_DELAY_CONDITIONAL) &&
cfs_fail_val ==
- tsi2mdt_info(tsi)->mti_mdt->mdt_seq_site.ss_node_id)
- schedule_timeout_and_set_state(TASK_UNINTERRUPTIBLE,
- msecs_to_jiffies(3 * MSEC_PER_SEC));
+ tsi2mdt_info(tsi)->mti_mdt->mdt_seq_site.ss_node_id) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(msecs_to_jiffies(3 * MSEC_PER_SEC));
+ }
rc = tgt_connect(tsi);
if (rc != 0)
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, NULL);
+ KEY_OSP_CONNECTED, NULL, NULL);
if (rc)
RETURN(-EAGAIN);
set_bit(MDT_FL_SYNCED, &mdt->mdt_state);
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;
MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>");
MODULE_DESCRIPTION("Lustre Metadata Target ("LUSTRE_MDT_NAME")");
+MODULE_VERSION(LUSTRE_VERSION_STRING);
MODULE_LICENSE("GPL");
-cfs_module(mdt, LUSTRE_VERSION_STRING, mdt_mod_init, mdt_mod_exit);
+module_init(mdt_mod_init);
+module_exit(mdt_mod_exit);