Whamcloud - gitweb
LU-9567 mgc: set cfg_instance to NULL for sptlrpc case 20/27320/6
authorJames Simmons <uja.ornl@yahoo.com>
Thu, 8 Jun 2017 16:40:09 +0000 (12:40 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 19 Jun 2017 16:27:27 +0000 (16:27 +0000)
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 <uja.ornl@yahoo.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: https://review.whamcloud.com/27320
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mgc/mgc_request.c
lustre/obdclass/obd_config.c

index e6fc636..4bc226c 100644 (file)
@@ -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;
index 193c8c6..64ebf6e 100644 (file)
@@ -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]);