+ param_len = strnlen(msp->mgs_param, sizeof(msp->mgs_param));
+ if (param_len == 0 || param_len == sizeof(msp->mgs_param))
+ RETURN(-EINVAL);
+
+ /* We only allow '*.lov.stripe{size,count,offset}=*' from an RPC. */
+ s = strchr(msp->mgs_param, '.');
+ if (s == NULL)
+ RETURN(-EINVAL);
+
+ if (!str_starts_with(s + 1, "lov.stripesize=") &&
+ !str_starts_with(s + 1, "lov.stripecount=") &&
+ !str_starts_with(s + 1, "lov.stripeoffset="))
+ RETURN(-EINVAL);
+