libcfs_debug_vmsg2(msgdata, fmt, args,
"qmt:%s pool:%d-%s id:"LPU64" enforced:%d hard:"LPU64
" soft:"LPU64" granted:"LPU64" time:"LPU64" qunit:"
- LPU64" edquot:%d revoke:"LPU64"\n",
+ LPU64" edquot:%d may_rel:"LPU64" revoke:"LPU64"\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_qunit, lqe->lqe_edquot, lqe->lqe_may_rel,
lqe->lqe_revoke_time);
}
void qmt_adjust_edquot(struct lquota_entry *lqe, __u64 now)
{
struct qmt_pool_info *pool = lqe2qpi(lqe);
+ ENTRY;
if (!lqe->lqe_enforced)
RETURN_EXIT;
* some quota space */
RETURN_EXIT;
+ if (lqe->lqe_revoke_time == 0)
+ /* least qunit value not sent to all slaves yet */
+ RETURN_EXIT;
+
if (lqe->lqe_may_rel != 0 &&
- cfs_time_beforeq_64(lqe->lqe_revoke_time,
- cfs_time_shift_64(-QMT_REBA_TIMEOUT)))
+ cfs_time_before_64(cfs_time_shift_64(-QMT_REBA_TIMEOUT),
+ lqe->lqe_revoke_time))
/* Let's give more time to slave to release space */
RETURN_EXIT;
/* let's notify slave by issuing glimpse on per-ID lock.
* the rebalance thread will take care of this */
qmt_id_lock_notify(pool->qpi_qmt, lqe);
+ EXIT;
}
/*