lmi = server_find_mount(LUSTRE_MGS_OBDNAME);
if (lmi) {
lsi = s2lsi(lmi->lmi_sb);
- LCONSOLE_ERROR_MSG(0x15d,
- "The MGS service was already started from server\n");
+ LCONSOLE_ERROR("The MGS service was already started from server\n");
RETURN(-EALREADY);
}
if (rc < 0) {
server_deregister_mount(LUSTRE_MGS_OBDNAME);
report_err:
- LCONSOLE_ERROR_MSG(0x15e,
- "Failed to start MGS '%s' (%d). Is the 'mgs' module loaded?\n",
- LUSTRE_MGS_OBDNAME, rc);
+ LCONSOLE_ERROR("Failed to start MGS '%s' (%d). Is the 'mgs' module loaded?\n",
+ LUSTRE_MGS_OBDNAME, rc);
}
RETURN(rc);
}
if (!mti)
GOTO(free_list, mti = ERR_PTR(-ENOMEM));
- if (strlcpy(mti->mti_svname, lsi->lsi_svname, sizeof(mti->mti_svname))
- >= sizeof(mti->mti_svname))
- GOTO(free_mti, rc = -E2BIG);
+ rc = strscpy(mti->mti_svname, lsi->lsi_svname, sizeof(mti->mti_svname));
+ if (rc < 0)
+ GOTO(free_mti, rc);
mti->mti_nid_count = nid_count;
for (i = 0; i < mti->mti_nid_count; i++) {
/* use NID strings instead */
if (large_nid)
mti->mti_flags |= LDD_F_LARGE_NID;
- cplen = strlcpy(mti->mti_params, lsi->lsi_lmd->lmd_params,
+ cplen = strscpy(mti->mti_params, lsi->lsi_lmd->lmd_params,
sizeof(mti->mti_params));
if (cplen >= sizeof(mti->mti_params))
rc = -E2BIG;
mti_len, mti, NULL);
if (rc < 0) {
if (mti->mti_flags & LDD_F_ERROR) {
- LCONSOLE_ERROR_MSG(0x160,
- "%s: the MGS refuses to allow this server to start: rc = %d. Please see messages on the MGS.\n",
- lsi->lsi_svname, rc);
+ LCONSOLE_ERROR("%s: the MGS refuses to allow this server to start: rc = %d. Please see messages on the MGS.\n",
+ lsi->lsi_svname, rc);
} else if (must_succeed) {
if ((rc == -ESHUTDOWN || rc == -EIO) && ++tried < 5) {
/* The connection with MGS is not established.
goto again;
}
- LCONSOLE_ERROR_MSG(0x15f,
- "%s: cannot register this server with the MGS: rc = %d. Is the MGS running?\n",
- lsi->lsi_svname, rc);
+ LCONSOLE_ERROR("%s: cannot register this server with the MGS: rc = %d. Is the MGS running?\n",
+ lsi->lsi_svname, rc);
} else {
CDEBUG(D_HA,
"%s: error registering with the MGS: rc = %d (not fatal)\n",
strlen(fstype) >= sizeof(lsi->lsi_fstype))
RETURN(-ENAMETOOLONG);
- strlcpy(lsi->lsi_svname, lsi->lsi_lmd->lmd_profile,
+ strscpy(lsi->lsi_svname, lsi->lsi_lmd->lmd_profile,
sizeof(lsi->lsi_svname));
- strlcpy(lsi->lsi_osd_type, osd_type, sizeof(lsi->lsi_osd_type));
+ strscpy(lsi->lsi_osd_type, osd_type, sizeof(lsi->lsi_osd_type));
/* XXX: a temp. solution for components using ldiskfs
* to be removed in one of the subsequent patches
*/
- strlcpy(lsi->lsi_fstype, fstype, sizeof(lsi->lsi_fstype));
+ strscpy(lsi->lsi_fstype, fstype, sizeof(lsi->lsi_fstype));
/* Determine server type */
rc = server_name2index(lsi->lsi_svname, &index, NULL);
CDEBUG(D_SUPER, "%s: root_inode from %s ino=%lu, dev=%x\n",
lsi->lsi_svname, root_inode == inode ? "lsi" : "vfsmnt",
root_inode->i_ino, root_inode->i_rdev);
- generic_fillattr(IDMAP_ARG root_inode, stat);
+ generic_fillattr(IDMAP_ARG RQMASK_ARG root_inode, stat);
iput(root_inode);
return 0;
lsi->lsi_svname, lsi->lsi_lmd->lmd_dev);
if (class_name2obd(lsi->lsi_svname)) {
- LCONSOLE_ERROR_MSG(0x161,
- "The target named %s is already running. Double-mount may have compromised the disk journal.\n",
- lsi->lsi_svname);
+ LCONSOLE_ERROR("The target named %s is already running. Double-mount may have compromised the disk journal.\n",
+ lsi->lsi_svname);
lustre_put_lsi(sb);
RETURN(-EALREADY);
}