From 70e1532f6216e4ff925bb9a902ec6bd8ea81c084 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 Change-Id: I9310237d58a21ee8d47daab8901892bd12016339 Signed-off-by: Hongchao Zhang Reviewed-on: https://review.whamcloud.com/30765 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Fan Yong Tested-by: Maloo Reviewed-by: Oleg Drokin --- 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 86bc789..51a985c 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