Client or server should not fail to mount if it hits
a configuration parameter that it doesn't understand.
This patch fixes class_process_config() to meet
the above requirement.
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ida537193459f08d804fc4c0f1f72630b416440e3
Reviewed-on: http://review.whamcloud.com/4663
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
client_process_config) {
err = (*client_process_config)(lcfg);
GOTO(out, err);
client_process_config) {
err = (*client_process_config)(lcfg);
GOTO(out, err);
- } else if ((class_match_param(lustre_cfg_string(lcfg, 1),
- PARAM_SYS, &tmp) == 0)) {
- /* Global param settings */
- err = class_set_global(tmp, lcfg->lcfg_num);
- /* Note that since LCFG_PARAM is LCFG_REQUIRED, new
- unknown globals would cause config to fail */
- if (err)
- CWARN("Ignoring unknown param %s\n", tmp);
- GOTO(out, 0);
- }
+ } else if ((class_match_param(lustre_cfg_string(lcfg, 1),
+ PARAM_SYS, &tmp) == 0)) {
+ /* Global param settings */
+ err = class_set_global(tmp, lcfg->lcfg_num);
+ /*
+ * Client or server should not fail to mount if
+ * it hits an unknown configuration parameter.
+ */
+ if (err != 0)
+ CWARN("Ignoring unknown param %s\n", tmp);
+
+ GOTO(out, err = 0);
+ }
/* Fall through */
break;
/* Fall through */
break;