Whamcloud - gitweb
LU-8066 obd: map MDS lov/osc to lod/osp 91/36791/2
authorJames Simmons <jsimmons@infradead.org>
Mon, 18 Nov 2019 22:22:54 +0000 (17:22 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Dec 2019 05:59:49 +0000 (05:59 +0000)
Before Lustre 2.4 the MDS mirrored the clients with its osc / lov
proc tree. After the OSD changes a new lod / osp proc tree was
created but to maintain back ward compatibility special symlinks
were created. We really don't need the symlinks any more.
Instead we can expand the modification of lustre_cfg done in the
function class_config_llog_handler() to include the cases of
LCFG_SET_PARAM and LCFG_PARAM. This means anyone setting on the
tunables on MDS using the old lov / osc format can be formated
to use lod / osp instead. This way when the symlinks do get
removed handling the old format will continue to work

Change-Id: Id82f095501440981fd8e4a07be09f35adba447e5
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36791
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
lustre/obdclass/obd_config.c

index a54308d..580e317 100644 (file)
@@ -1640,21 +1640,22 @@ int class_config_llog_handler(const struct lu_env *env,
 
 #ifdef HAVE_SERVER_SUPPORT
                /* newer MDS replaces LOV/OSC with LOD/OSP */
-               {
+               if ((lcfg->lcfg_command == LCFG_ATTACH ||
+                    lcfg->lcfg_command == LCFG_SET_PARAM ||
+                    lcfg->lcfg_command == LCFG_PARAM) &&
+                   cfg->cfg_sb && IS_MDT(s2lsi(cfg->cfg_sb))) {
                        char *typename = lustre_cfg_string(lcfg, 1);
 
-                       if ((lcfg->lcfg_command == LCFG_ATTACH && typename &&
-                           strcmp(typename, LUSTRE_LOV_NAME) == 0) &&
-                           cfg->cfg_sb && IS_MDT(s2lsi(cfg->cfg_sb))) {
+                       if (typename &&
+                           strcmp(typename, LUSTRE_LOV_NAME) == 0) {
                                CDEBUG(D_CONFIG,
                                       "For 2.x interoperability, rename obd "
                                       "type from lov to lod (%s)\n",
                                       s2lsi(cfg->cfg_sb)->lsi_svname);
                                strcpy(typename, LUSTRE_LOD_NAME);
                        }
-                       if ((lcfg->lcfg_command == LCFG_ATTACH && typename &&
-                           strcmp(typename, LUSTRE_OSC_NAME) == 0) &&
-                           cfg->cfg_sb && IS_MDT(s2lsi(cfg->cfg_sb))) {
+                       if (typename &&
+                           strcmp(typename, LUSTRE_OSC_NAME) == 0) {
                                CDEBUG(D_CONFIG,
                                       "For 2.x interoperability, rename obd "
                                       "type from osc to osp (%s)\n",