From b03de1fe3d11d65716020cfd07e0db16628af5c7 Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Wed, 6 Dec 2017 16:49:54 +0800 Subject: [PATCH] LU-9158 quota: adjust quota ASAP In qsd_upd_thread, the quota adjust request will only be scheduled to run when the current time (seconds) is larger than the queued time (seconds). The transactions in subtest 12b of sanity_quota are committed in one second simultaneously, which cause the quota is not freed. Test-Parameters: alwaysuploadlogs \ envdefinitions=ENABLE_QUOTA=yes,DEBUG_SIZE=64,PTLDEBUG=rpctrace \ clientcount=2 osscount=2 mdscount=2 mdtcount=4 \ austeroptions=-R mdtfilesystemtype=zfs ostfilesystemtype=zfs \ testlist=sanity-quota,sanity-quota,sanity-quota,sanity-quota Lustre-change: https://review.whamcloud.com/30765 Lustre-commit: 70e1532f6216e4ff925bb9a902ec6bd8ea81c084 Change-Id: I9310237d58a21ee8d47daab8901892bd12016339 Signed-off-by: Hongchao Zhang Reviewed-by: Andreas Dilger Reviewed-by: Fan Yong Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/31404 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- lustre/quota/qsd_writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/quota/qsd_writeback.c b/lustre/quota/qsd_writeback.c index 47fd727..754cc9e 100644 --- a/lustre/quota/qsd_writeback.c +++ b/lustre/quota/qsd_writeback.c @@ -378,7 +378,7 @@ static bool qsd_job_pending(struct qsd_instance *qsd, struct list_head *upd, struct lquota_entry *lqe; lqe = list_entry(qsd->qsd_adjust_list.next, struct lquota_entry, lqe_link); - if (ktime_get_seconds() > lqe->lqe_adjust_time) + if (ktime_get_seconds() >= lqe->lqe_adjust_time) job_pending = true; } spin_unlock(&qsd->qsd_adjust_lock); -- 1.8.3.1