#define LCFG_REQUIRED 0x0001000
enum lcfg_command_type {
- LCFG_ATTACH = 0x00cf001,
- LCFG_DETACH = 0x00cf002,
- LCFG_SETUP = 0x00cf003,
- LCFG_CLEANUP = 0x00cf004,
- LCFG_ADD_UUID = 0x00cf005,
- LCFG_DEL_UUID = 0x00cf006,
- LCFG_MOUNTOPT = 0x00cf007,
- LCFG_DEL_MOUNTOPT = 0x00cf008,
- LCFG_SET_TIMEOUT = 0x00cf009,
- LCFG_SET_UPCALL = 0x00cf00a,
- LCFG_ADD_CONN = 0x00cf00b,
- LCFG_DEL_CONN = 0x00cf00c,
- LCFG_LOV_ADD_OBD = 0x00cf00d,
- LCFG_LOV_DEL_OBD = 0x00cf00e,
- LCFG_PARAM = 0x00cf00f,
- LCFG_MARKER = 0x00cf010,
- LCFG_LOG_START = 0x00ce011,
- LCFG_LOG_END = 0x00ce012,
- LCFG_LOV_ADD_INA = 0x00ce013,
- LCFG_ADD_MDC = 0x00cf014,
- LCFG_DEL_MDC = 0x00cf015,
- LCFG_SPTLRPC_CONF = 0x00ce016,
- LCFG_POOL_NEW = 0x00ce020,
- LCFG_POOL_ADD = 0x00ce021,
- LCFG_POOL_REM = 0x00ce022,
- LCFG_POOL_DEL = 0x00ce023,
+ LCFG_ATTACH = 0x00cf001,
+ LCFG_DETACH = 0x00cf002,
+ LCFG_SETUP = 0x00cf003,
+ LCFG_CLEANUP = 0x00cf004,
+ LCFG_ADD_UUID = 0x00cf005,
+ LCFG_DEL_UUID = 0x00cf006,
+ LCFG_MOUNTOPT = 0x00cf007,
+ LCFG_DEL_MOUNTOPT = 0x00cf008,
+ LCFG_SET_TIMEOUT = 0x00cf009,
+ LCFG_SET_UPCALL = 0x00cf00a,
+ LCFG_ADD_CONN = 0x00cf00b,
+ LCFG_DEL_CONN = 0x00cf00c,
+ LCFG_LOV_ADD_OBD = 0x00cf00d,
+ LCFG_LOV_DEL_OBD = 0x00cf00e,
+ LCFG_PARAM = 0x00cf00f,
+ LCFG_MARKER = 0x00cf010,
+ LCFG_SET_LDLM_TIMEOUT = 0x00cf011,
+ LCFG_LOG_START = 0x00ce011,
+ LCFG_LOG_END = 0x00ce012,
+ LCFG_LOV_ADD_INA = 0x00ce013,
+ LCFG_ADD_MDC = 0x00cf014,
+ LCFG_DEL_MDC = 0x00cf015,
+ LCFG_SPTLRPC_CONF = 0x00ce016,
+ LCFG_POOL_NEW = 0x00ce020,
+ LCFG_POOL_ADD = 0x00ce021,
+ LCFG_POOL_REM = 0x00ce022,
+ LCFG_POOL_DEL = 0x00ce023,
};
struct lustre_cfg_bufs {
GOTO(end, rc);
}
+ if (class_match_param(ptr, PARAM_LDLM_TIMEOUT, &tmp) == 0) {
+ /* Change ldlm timeout */
+ int timeout;
+ timeout = simple_strtoul(tmp, NULL, 0);
+
+ CDEBUG(D_MGS, "ldlm timeout %d\n", timeout);
+
+ lustre_cfg_bufs_reset(&bufs, NULL);
+ lcfg = lustre_cfg_new(LCFG_SET_LDLM_TIMEOUT, &bufs);
+ lcfg->lcfg_num = timeout;
+ /* modify all servers and clients */
+ rc = mgs_write_log_direct_all(obd, fsdb, mti, lcfg,
+ mti->mti_fsname,
+ "ldlm_timeout");
+ lustre_cfg_free(lcfg);
+ GOTO(end, rc);
+ }
+
if (class_match_param(ptr, PARAM_OSC""PARAM_ACTIVE, &tmp) == 0) {
/* active=0 means off, anything else means on */
char mdt_index[16];
GOTO(out, err = 0);
}
case LCFG_SET_TIMEOUT: {
- CDEBUG(D_IOCTL, "changing lustre timeout from %d to %d\n",
+ CDEBUG(D_IOCTL, "changing lustre obd_timeout from %d to %d\n",
obd_timeout, lcfg->lcfg_num);
obd_timeout = max(lcfg->lcfg_num, 1U);
GOTO(out, err = 0);
}
+ case LCFG_SET_LDLM_TIMEOUT: {
+ CDEBUG(D_IOCTL, "changing lustre ldlm_timeout from %d to %d\n",
+ ldlm_timeout, lcfg->lcfg_num);
+ ldlm_timeout = max(lcfg->lcfg_num, 1U);
+ if (ldlm_timeout > obd_timeout)
+ ldlm_timeout = max(obd_timeout / 3, 1U);
+
+ GOTO(out, err = 0);
+ }
case LCFG_SET_UPCALL: {
LCONSOLE_ERROR_MSG(0x15a, "recovery upcall is deprecated\n");
/* COMPAT_146 Don't fail on old configs */