From 120f8bb18486f87cc0d95f68509c269aae0fd185 Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Sat, 7 Jul 2018 13:55:21 -0400 Subject: [PATCH] LU-11141 quota: reset adjust schedule when updating lqe The scheduled adjust for some lquota_entry should be reset when its limits (hard or soft) are updated by the glimpse callback from QMT. Test-Parameters: mdtfilesystemtype=zfs ostfilesystemtype=zfs \ testlist=sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota Change-Id: Ia16cd90adfa15b92577841259f91f2b275fc7e82 Signed-off-by: Hongchao Zhang Reviewed-on: https://review.whamcloud.com/32819 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Wang Shilong Reviewed-by: Oleg Drokin --- lustre/quota/qsd_writeback.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/quota/qsd_writeback.c b/lustre/quota/qsd_writeback.c index 4729c69..3c4f0fd 100644 --- a/lustre/quota/qsd_writeback.c +++ b/lustre/quota/qsd_writeback.c @@ -298,6 +298,11 @@ static int qsd_process_upd(const struct lu_env *env, struct qsd_upd_rec *upd) GOTO(out, rc); /* refresh usage */ qsd_refresh_usage(env, lqe); + + spin_lock(&qqi->qqi_qsd->qsd_adjust_lock); + lqe->lqe_adjust_time = 0; + spin_unlock(&qqi->qqi_qsd->qsd_adjust_lock); + /* Report usage asynchronously */ rc = qsd_adjust(env, lqe); if (rc) -- 1.8.3.1