From 8174d2d1e1db3293a5e8b071d15f04c34667551a Mon Sep 17 00:00:00 2001 From: ericm Date: Wed, 20 Aug 2008 18:07:01 +0000 Subject: [PATCH] branch: b1_8_gate sptlrpc 2.0 intero stub. b=15363 r=green,fanyong --- lustre/obdclass/obd_config.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index 495533e..0c85bc0 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -622,6 +622,29 @@ int class_del_conn(struct obd_device *obd, struct lustre_cfg *lcfg) RETURN(rc); } +struct sptlrpc_conf_log_hdr { + __u32 scl_max; + __u32 scl_nrule; +}; + +static int class_sptlrpc_conf(struct obd_device *obd, struct lustre_cfg *lcfg) +{ + struct sptlrpc_conf_log_hdr *log; + + log = lustre_cfg_buf(lcfg, 1); + if (log == NULL || lcfg->lcfg_buflens[1] < sizeof(*log)) { + CERROR("missing data in sptlrpc config record\n"); + return 0; + } + + /* don't care endian */ + if (log->scl_nrule != 0) + CWARN("Please notify your sysadmin to remove all " + "sptlrpc rules on MGS\n"); + + return 0; +} + CFS_LIST_HEAD(lustre_profile_list); struct lustre_profile *class_get_profile(char * prof) @@ -846,6 +869,10 @@ int class_process_config(struct lustre_cfg *lcfg) err = class_del_conn(obd, lcfg); GOTO(out, err = 0); } + case LCFG_SPTLRPC_CONF: { + err = class_sptlrpc_conf(obd, lcfg); + GOTO(out, err = 0); + } default: { err = obd_process_config(obd, sizeof(*lcfg), lcfg); GOTO(out, err); -- 1.8.3.1