+ case OBD_IOC_CLEAR_CONFIGS: {
+ if (!data->ioc_inllen1 || !data->ioc_inlbuf1) {
+ rc = -EINVAL;
+ CERROR("%s: no device or fsname specified: rc = %d\n",
+ exp->exp_obd->obd_name, rc);
+ break;
+ }
+
+ if (data->ioc_inllen1 > MTI_NAME_MAXLEN) {
+ rc = -EOVERFLOW;
+ CERROR("%s: device or fsname is too long: rc = %d\n",
+ exp->exp_obd->obd_name, rc);
+ break;
+ }
+
+ if (data->ioc_inlbuf1[data->ioc_inllen1 - 1] != 0) {
+ rc = -EINVAL;
+ CERROR("%s: device or fsname is not NUL terminated: "
+ "rc = %d\n", exp->exp_obd->obd_name, rc);
+ break;
+ }
+
+ /* remove records marked SKIP from config logs */
+ rc = mgs_clear_configs(&env, mgs, data->ioc_inlbuf1);
+ if (rc)
+ CERROR("%s: error clearing config log: rc = %d\n",
+ exp->exp_obd->obd_name, rc);
+
+ break;
+ }
+