Whamcloud - gitweb
branch: b1_8_gate
authorericm <ericm>
Wed, 20 Aug 2008 18:07:01 +0000 (18:07 +0000)
committerericm <ericm>
Wed, 20 Aug 2008 18:07:01 +0000 (18:07 +0000)
sptlrpc 2.0 intero stub.
b=15363
r=green,fanyong

lustre/obdclass/obd_config.c

index 495533e..0c85bc0 100644 (file)
@@ -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);