From: James Simmons Date: Mon, 18 Nov 2019 22:22:54 +0000 (-0500) Subject: LU-8066 obd: map MDS lov/osc to lod/osp X-Git-Tag: 2.13.51~76 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=d307873ae5f5c9c3a8f540ad921df9ade0bd33d3 LU-8066 obd: map MDS lov/osc to lod/osp 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 Reviewed-on: https://review.whamcloud.com/36791 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Yang Sheng --- diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index a54308d..580e317 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -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",