}
/* Process client llogs */
- name_create(&logname, fsname, "-client");
+ rc = name_create(&logname, fsname, "-client");
+ if (rc)
+ GOTO(out, rc);
rc = mgs_replace_nids_log(env, mgs_obd, logname, devname, nids);
name_destroy(&logname);
if (rc) {
for (i = 0; i < INDEX_MAP_SIZE * 8; i++) {
if (!test_bit(i, fsdb->fsdb_mdt_index_map))
continue;
- name_create_mdt(&logname, fsname, i);
+ rc = name_create_mdt(&logname, fsname, i);
+ if (rc)
+ GOTO(out, rc);
rc = mgs_replace_nids_log(env, mgs_obd, logname, devname, nids);
name_destroy(&logname);
if (rc)
int rc, del;
/* Erase any old settings of this same parameter */
- memcpy(comment, ptr, MTI_NAME_MAXLEN);
- comment[MTI_NAME_MAXLEN - 1] = 0;
+ strlcpy(comment, ptr, sizeof(comment));
/* But don't try to match the value. */
tmp = strchr(comment, '=');
if (tmp != NULL)
if (class_match_param(ptr, PARAM_NETWORK, NULL) == 0)
GOTO(end, rc);
- /* Processed in mgs_write_log_ost */
- if (class_match_param(ptr, PARAM_FAILMODE, NULL) == 0) {
- if (mti->mti_flags & LDD_F_PARAM) {
- LCONSOLE_ERROR_MSG(0x169, "%s can only be "
- "changed with tunefs.lustre"
- "and --writeconf\n", ptr);
- rc = -EPERM;
- }
- GOTO(end, rc);
- }
+ /* Processed in mgs_write_log_ost */
+ if (class_match_param(ptr, PARAM_FAILMODE, NULL) == 0) {
+ if (mti->mti_flags & LDD_F_PARAM) {
+ LCONSOLE_ERROR_MSG(0x169,
+ "%s can only be changed with tunefs.lustre and --writeconf\n",
+ ptr);
+ rc = -EPERM;
+ }
+ GOTO(end, rc);
+ }
if (class_match_param(ptr, PARAM_SRPC, NULL) == 0) {
rc = mgs_srpc_set_param(env, mgs, fsdb, mti, ptr);
}
active_err:
if (rc < 0) {
- LCONSOLE_ERROR_MSG(0x145, "Couldn't find %s in"
- "log (%d). No permanent "
- "changes were made to the "
- "config log.\n",
+ LCONSOLE_ERROR_MSG(0x145,
+ "Couldn't find %s in log (%d). No permanent changes were made to the config log.\n",
mti->mti_svname, rc);
if (test_bit(FSDB_OLDLOG14, &fsdb->fsdb_flags))
- LCONSOLE_ERROR_MSG(0x146, "This may be"
- " because the log"
- "is in the old 1.4"
- "style. Consider "
- " --writeconf to "
- "update the logs.\n");
+ LCONSOLE_ERROR_MSG(0x146,
+ "This may be because the log is in the old 1.4 style. Consider --writeconf to update the logs.\n");
GOTO(end, rc);
}
/* Fall through to osc/mdc proc for deactivating live