Whamcloud - gitweb
LU-11467 utils: add lfs mirror delete command
[fs/lustre-release.git] / lustre / quota / qmt_entry.c
index c6bd58f..d3ed254 100644 (file)
@@ -160,23 +160,21 @@ static int qmt_lqe_read(const struct lu_env *env, struct lquota_entry *lqe,
  */
 static void qmt_lqe_debug(struct lquota_entry *lqe, void *arg,
                          struct libcfs_debug_msg_data *msgdata,
-                         const char *fmt, va_list args)
+                         struct va_format *vaf)
 {
        struct qmt_pool_info    *pool = (struct qmt_pool_info *)arg;
 
-       libcfs_debug_vmsg2(msgdata, fmt, args,
-                          "qmt:%s pool:%d-%s id:%llu enforced:%d hard:%llu"
-                          " soft:%llu granted:%llu time:%llu qunit: %llu"
-                          " edquot:%d may_rel:%llu revoke:%lld default:%s\n",
-                          pool->qpi_qmt->qmt_svname,
-                          pool->qpi_key & 0x0000ffff,
-                          RES_NAME(pool->qpi_key >> 16),
-                          lqe->lqe_id.qid_uid, lqe->lqe_enforced,
-                          lqe->lqe_hardlimit, lqe->lqe_softlimit,
-                          lqe->lqe_granted, lqe->lqe_gracetime,
-                          lqe->lqe_qunit, lqe->lqe_edquot, lqe->lqe_may_rel,
-                          lqe->lqe_revoke_time,
-                          lqe->lqe_is_default ? "yes" : "no");
+       libcfs_debug_msg(msgdata,
+                        "%pV qmt:%s pool:%s-%s id:%llu enforced:%d hard:%llu soft:%llu granted:%llu time:%llu qunit: %llu edquot:%d may_rel:%llu revoke:%lld default:%s\n",
+                        vaf, pool->qpi_qmt->qmt_svname,
+                        RES_NAME(pool->qpi_rtype),
+                        pool->qpi_name,
+                        lqe->lqe_id.qid_uid, lqe->lqe_enforced,
+                        lqe->lqe_hardlimit, lqe->lqe_softlimit,
+                        lqe->lqe_granted, lqe->lqe_gracetime,
+                        lqe->lqe_qunit, lqe->lqe_edquot, lqe->lqe_may_rel,
+                        lqe->lqe_revoke_time,
+                        lqe->lqe_is_default ? "yes" : "no");
 }
 
 /*
@@ -485,7 +483,7 @@ void qmt_adjust_edquot(struct lquota_entry *lqe, __u64 now)
 
                /* See comment in qmt_adjust_qunit(). LU-4139 */
                if (qmt_hard_exhausted(lqe) ||
-                   pool->qpi_key >> 16 != LQUOTA_RES_DT) {
+                   pool->qpi_rtype != LQUOTA_RES_DT) {
                        time64_t lapse;
 
                        /* we haven't reached the minimal qunit yet so there is
@@ -545,7 +543,7 @@ static __u64 qmt_calc_softlimit(struct lquota_entry *lqe, bool *oversoft)
        LASSERT(lqe->lqe_softlimit != 0);
        *oversoft = false;
        /* No need to do special tweaking for inode limit */
-       if (pool->qpi_key >> 16 != LQUOTA_RES_DT)
+       if (pool->qpi_rtype != LQUOTA_RES_DT)
                return lqe->lqe_softlimit;
 
        if (lqe->lqe_granted <= lqe->lqe_softlimit +