From fb9a8a991f5c9e8649053e86b3147a99aaee9f84 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 8 Jun 2017 12:40:09 -0400 Subject: [PATCH] LU-9567 mgc: set cfg_instance to NULL for sptlrpc case The patch for LU-9034 mapped config logs to separate mgc devices. This change broke sptlrpc by preventing the ablitity to pass along config log change with lctl conf_param. The reason for this is due to the cfg_instance field being set to an obd device pointer. This patch sets cfg_instance back to NULL to restore the functionality. This is only a temporary work around so GSS can function for the 2.10 release. A proper fix will be worked out in 2.11. Change-Id: Ic60e6516802d3617b38df3371f52a7f27aeae8cd Signed-off-by: James Simmons Signed-off-by: John L. Hammond Reviewed-on: https://review.whamcloud.com/27320 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/mgc/mgc_request.c | 4 ++++ lustre/obdclass/obd_config.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index e6fc636..4bc226c 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -296,6 +296,10 @@ static struct config_llog_data *config_log_find_or_add(struct obd_device *obd, struct config_llog_data *cld; lcfg.cfg_instance = sb != NULL ? (void *)sb : (void *)obd; + + if (type == CONFIG_T_SPTLRPC) + lcfg.cfg_instance = NULL; + cld = config_log_find(logname, &lcfg); if (unlikely(cld != NULL)) return cld; diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index 193c8c6..64ebf6e 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -1651,7 +1651,7 @@ int class_config_llog_handler(const struct lu_env *env, * moving them to index [1] and [2], and insert MGC's * obdname at index [0]. */ - if (cfg->cfg_instance != NULL && + if (cfg->cfg_instance == NULL && lcfg->lcfg_command == LCFG_SPTLRPC_CONF) { lustre_cfg_bufs_set(&bufs, 2, bufs.lcfg_buf[1], bufs.lcfg_buflen[1]); -- 1.8.3.1