From 398fd6e9da8c845efb45bdc6b0af2c8440219d7e Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Tue, 22 Mar 2011 23:30:33 -0700 Subject: [PATCH] LU-110 Recognize old mdt.quota_type param Minor changes in mdt_process_config() to make it capable of recognizing old mdt.quota_type. Issue: Signed-off-by: Niu Yawei Change-Id: Ie13851eee573eb633a68bf5ee3cd86dbbf1bd1a9 Reviewed-on: http://review.whamcloud.com/354 Tested-by: Hudson Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_handler.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 58220e5..7d0be2b 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -4728,15 +4728,21 @@ static int mdt_process_config(const struct lu_env *env, /* * For interoperability between 1.8 and 2.0, - * skip old "mdt.group_upcall" param. */ { + /* Skip old "mdt.group_upcall" param. */ char *param = lustre_cfg_string(cfg, 1); if (param && !strncmp("mdt.group_upcall", param, 16)) { CWARN("For 1.8 interoperability, skip this" " mdt.group_upcall. It is obsolete\n"); break; } + /* Rename old "mdt.quota_type" to "mdd.quota_type. */ + if (param && !strncmp("mdt.quota_type", param, 14)) { + CWARN("Found old param mdt.quota_type, changed" + " it to mdd.quota_type.\n"); + param[2] = 'd'; + } } lprocfs_mdt_init_vars(&lvars); -- 1.8.3.1