From: Johann Lombardi Date: Tue, 16 Oct 2012 16:50:57 +0000 (+0200) Subject: LU-2197 quota: don't send preacq if no usage and no activity X-Git-Tag: 2.3.54~30 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=54a792d389e7d21151031a63731567cb877f918c LU-2197 quota: don't send preacq if no usage and no activity Slaves should not try to pre-acquire quota space when the ID has no usage and there is no outstanding activities. Signed-off-by: Johann Lombardi Change-Id: I5076910024deca2a1dc75189837dd2b6cdabe7bf Reviewed-on: http://review.whamcloud.com/4279 Tested-by: Hudson Reviewed-by: Fan Yong Reviewed-by: Niu Yawei Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/quota/qsd_handler.c b/lustre/quota/qsd_handler.c index 40c8cba..5bdb0cf 100644 --- a/lustre/quota/qsd_handler.c +++ b/lustre/quota/qsd_handler.c @@ -158,7 +158,7 @@ static void qsd_dqacq_completion(const struct lu_env *env, lqe_write_lock(lqe); - LQUOTA_DEBUG(lqe, "DQACQ returned %d, flags:%x", ret, + LQUOTA_DEBUG(lqe, "DQACQ returned %d, flags:0x%x", ret, reqbody->qb_flags); /* despite -EDQUOT & -EINPROGRESS errors, the master might still @@ -167,8 +167,8 @@ static void qsd_dqacq_completion(const struct lu_env *env, if (ret != -ETIMEDOUT && ret != -ENOTCONN && ret != -ESHUTDOWN && ret != -EAGAIN) /* print errors only if return code is unexpected */ - LQUOTA_ERROR(lqe, "DQACQ failed with %d, flags:%x", ret, - reqbody->qb_flags); + LQUOTA_ERROR(lqe, "DQACQ failed with %d, flags:0x%x", + ret, reqbody->qb_flags); GOTO(out, ret); } @@ -388,7 +388,7 @@ again: } if (!lqe->lqe_edquot && !lqe->lqe_nopreacq && - lustre_handle_is_used(&lqe->lqe_lockh) && + lustre_handle_is_used(&lqe->lqe_lockh) && usage > 0 && lqe->lqe_qunit != 0 && granted < usage + lqe->lqe_qtune) { /* To pre-acquire quota space, we report how much spare * quota space the slave currently owns, then the master