@@ -166,7 +166,6 @@ int class_config_llog_handler(const struct lu_env *env,
/* Passed as data param to class_config_parse_llog */
struct config_llog_instance {
- char *cfg_obdname;
void *cfg_instance;
struct super_block *cfg_sb;
struct obd_uuid cfg_uuid;
@@ -224,10 +224,8 @@ struct config_llog_data *do_config_log_add(struct obd_device *obd,
/* Keep the mgc around until we are done */
cld->cld_mgcexp = class_export_get(obd->obd_self_export);
- if (cld_is_sptlrpc(cld)) {
+ if (cld_is_sptlrpc(cld))
sptlrpc_conf_log_start(logname);
- cld->cld_cfg.cfg_obdname = obd->obd_name;
- }
spin_lock(&config_list_lock);
list_add(&cld->cld_list_chain, &config_llog_list);
@@ -273,9 +271,6 @@ struct config_llog_data *do_config_log_add(struct obd_device *obd,
lcfg.cfg_instance = sb ? (void *)sb : (void *)obd;
- if (type == CONFIG_T_SPTLRPC)
- lcfg.cfg_instance = NULL;
-
cld = config_log_find(logname, &lcfg);
if (unlikely(cld))
return cld;
@@ -1357,6 +1357,7 @@ int class_config_llog_handler(const struct lu_env *env,
lustre_cfg_bufs_init(&bufs, lcfg);
if (clli && clli->cfg_instance &&
+ lcfg->lcfg_command != LCFG_SPTLRPC_CONF &&
LUSTRE_CFG_BUFLEN(lcfg, 0) > 0) {
inst_len = LUSTRE_CFG_BUFLEN(lcfg, 0) +
sizeof(clli->cfg_instance) * 2 + 4;
@@ -1389,12 +1390,14 @@ int class_config_llog_handler(const struct lu_env *env,
*/
if (clli && !clli->cfg_instance &&
lcfg->lcfg_command == LCFG_SPTLRPC_CONF) {
+ struct obd_device *obd = clli->cfg_instance;
+
lustre_cfg_bufs_set(&bufs, 2, bufs.lcfg_buf[1],
bufs.lcfg_buflen[1]);
lustre_cfg_bufs_set(&bufs, 1, bufs.lcfg_buf[0],
bufs.lcfg_buflen[0]);
lustre_cfg_bufs_set_string(&bufs, 0,
- clli->cfg_obdname);
+ obd->obd_name);
}
/* Add net info to setup command