seq_printf(m, " %s:\n"
" #slv: %d\n"
" #lqe: %d\n",
- QTYPE_NAME(type),
+ qtype_name(type),
pool->qpi_slv_nr[type],
atomic_read(&pool->qpi_site[type]->lqs_hash->hs_count));
&qti->qti_fid, false);
if (IS_ERR(obj)) {
rc = PTR_ERR(obj);
- CERROR("%s: failed to create glb index copy for"
- " %s type (%d)\n", qmt->qmt_svname,
- QTYPE_NAME(qtype), rc);
+ CERROR("%s: failed to create glb index copy for %s type: rc = %d\n",
+ qmt->qmt_svname, qtype_name(qtype), rc);
RETURN(rc);
}
rc = lquota_disk_write_glb(env, obj, 0, rec);
if (rc) {
- CERROR("%s: failed to set default "
- "grace time for %s type (%d)\n",
- qmt->qmt_svname,
- QTYPE_NAME(qtype), rc);
+ CERROR("%s: failed to set default grace time for %s type: rc = %d\n",
+ qmt->qmt_svname, qtype_name(qtype), rc);
RETURN(rc);
}
rc = lquota_disk_update_ver(env, dev, obj, 1);
if (rc) {
- CERROR("%s: failed to set initial "
- "version for %s type (%d)\n",
- qmt->qmt_svname,
- QTYPE_NAME(qtype), rc);
+ CERROR("%s: failed to set initial version for %s type: rc = %d\n",
+ qmt->qmt_svname, qtype_name(qtype), rc);
RETURN(rc);
}
}
&qmt_lqe_ops);
if (IS_ERR(pool->qpi_site[qtype])) {
rc = PTR_ERR(pool->qpi_site[qtype]);
- CERROR("%s: failed to create site for %s type "
- "(%d)\n", qmt->qmt_svname,
- QTYPE_NAME(qtype), rc);
+ CERROR("%s: failed to create site for %s type: rc = %d\n",
+ qmt->qmt_svname, qtype_name(qtype), rc);
RETURN(rc);
}
qmt_slv_cnt,
&pool->qpi_slv_nr[qtype]);
if (rc) {
- CERROR("%s: failed to scan & count slave "
- "indexes for %s type (%d)\n",
- qmt->qmt_svname, QTYPE_NAME(qtype), rc);
+ CERROR("%s: failed to scan & count slave indexes for %s type: rc = %d\n",
+ qmt->qmt_svname, qtype_name(qtype), rc);
RETURN(rc);
}
#ifdef CONFIG_PROC_FS
/* add procfs file to dump the global index, mostly for
* debugging purpose */
- sprintf(qti->qti_buf, "glb-%s", QTYPE_NAME(qtype));
+ snprintf(qti->qti_buf, MTI_NAME_MAXLEN,
+ "glb-%s", qtype_name(qtype));
rc = lprocfs_seq_create(pool->qpi_proc, qti->qti_buf,
0444, &lprocfs_quota_seq_fops,
obj);