Whamcloud - gitweb
b=16432
authorzhanghc <zhanghc>
Wed, 3 Dec 2008 15:56:57 +0000 (15:56 +0000)
committerzhanghc <zhanghc>
Wed, 3 Dec 2008 15:56:57 +0000 (15:56 +0000)
fix mgs_setparam, which will return -EINVAL when param
related to llite(PARAM_LLITE) is set by MDT or OST

i=johann
i=nathan.rutman

lustre/mgs/mgs_llog.c

index 89dcf26..e328f33 100644 (file)
@@ -2824,6 +2824,10 @@ int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname)
         ptr = strrchr(devname, '-');
         memset(fsname, 0, MTI_NAME_MAXLEN);
         if (ptr && (server_name2index(ptr, &index, NULL) >= 0)) {
+                /* param related to llite isn't allowed to set by OST or MDT */
+                if (strncmp(param, PARAM_LLITE, sizeof(PARAM_LLITE)) == 0)
+                        RETURN(-EINVAL);
+
                 strncpy(fsname, devname, ptr - devname);
         } else {
                 /* assume devname is the fsname */