X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fquota%2Fqmt_pool.c;h=d1eb1fa5a3b145a9979e68d021500a99014e8399;hp=b20658b8d09977fd8cdaf2f677ec1dedce508865;hb=ccabce23bd9e366c345c852f565766a799f61238;hpb=5963af745b3aa14410d5ceb66f8a7b7d6aaf576a diff --git a/lustre/quota/qmt_pool.c b/lustre/quota/qmt_pool.c index b20658b..d1eb1fa 100644 --- a/lustre/quota/qmt_pool.c +++ b/lustre/quota/qmt_pool.c @@ -21,7 +21,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2012, 2016, Intel Corporation. + * Copyright (c) 2012, 2017, Intel Corporation. * Use is subject to license terms. * * Author: Johann Lombardi @@ -163,7 +163,7 @@ static int qpi_state_seq_show(struct seq_file *m, void *data) 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)); @@ -542,9 +542,8 @@ int qmt_pool_prepare(const struct lu_env *env, struct qmt_device *qmt, &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); } @@ -561,19 +560,15 @@ int qmt_pool_prepare(const struct lu_env *env, struct qmt_device *qmt, 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); } } @@ -584,9 +579,8 @@ int qmt_pool_prepare(const struct lu_env *env, struct qmt_device *qmt, &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); } @@ -598,9 +592,8 @@ int qmt_pool_prepare(const struct lu_env *env, struct qmt_device *qmt, 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); } @@ -617,7 +610,8 @@ int qmt_pool_prepare(const struct lu_env *env, struct qmt_device *qmt, #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);