+ /* Modify client */
+ name_create(&logname, mti->mti_fsname, "-client");
+ rc = mgs_wlp_lcfg(obd, fsdb, mti, logname, &bufs,
+ cname, ptr);
+
+ /* osc params affect the MDT as well */
+ if (!rc && (mti->mti_flags & LDD_F_SV_TYPE_OST)) {
+ int i;
+
+ for (i = 0; i < INDEX_MAP_SIZE * 8; i++){
+ if (!cfs_test_bit(i, fsdb->fsdb_mdt_index_map))
+ continue;
+ name_destroy(&cname);
+ name_create_mdt_osc(&cname, mti->mti_svname,
+ fsdb, i);
+ name_destroy(&logname);
+ name_create_mdt(&logname, mti->mti_fsname, i);
+ if (!mgs_log_is_empty(obd, logname))
+ rc = mgs_wlp_lcfg(obd, fsdb,mti,logname,
+ &bufs, cname, ptr);
+ if (rc)
+ break;
+ }
+ }
+ name_destroy(&logname);
+ name_destroy(&cname);
+ GOTO(end, rc);
+ }
+
+ /* All mdt. params in proc */
+ if (class_match_param(ptr, PARAM_MDT, NULL) == 0) {
+ int i;
+ __u32 idx;
+
+ CDEBUG(D_MGS, "%.3s param %s\n", ptr, ptr + 4);
+ if (strncmp(mti->mti_svname, mti->mti_fsname,
+ MTI_NAME_MAXLEN) == 0)
+ /* device is unspecified completely? */
+ rc = LDD_F_SV_TYPE_MDT | LDD_F_SV_ALL;
+ else
+ rc = server_name2index(mti->mti_svname, &idx, NULL);
+ if (rc < 0)
+ goto active_err;
+ if ((rc & LDD_F_SV_TYPE_MDT) == 0)
+ goto active_err;
+ if (rc & LDD_F_SV_ALL) {
+ for (i = 0; i < INDEX_MAP_SIZE * 8; i++) {
+ if (!cfs_test_bit(i,
+ fsdb->fsdb_mdt_index_map))
+ continue;
+ name_create_mdt(&logname, mti->mti_fsname, i);
+ rc = mgs_wlp_lcfg(obd, fsdb, mti,
+ logname, &bufs,
+ logname, ptr);
+ name_destroy(&logname);
+ if (rc)
+ goto active_err;
+ }
+ } else {
+ rc = mgs_wlp_lcfg(obd, fsdb, mti,
+ mti->mti_svname, &bufs,
+ mti->mti_svname, ptr);
+ if (rc)
+ goto active_err;