Whamcloud - gitweb
LU-11141 quota: reset adjust schedule when updating lqe 19/32819/5
authorHongchao Zhang <hongchao@whamcloud.com>
Sat, 7 Jul 2018 17:55:21 +0000 (13:55 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 24 Jul 2018 16:01:28 +0000 (16:01 +0000)
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 <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32819
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/quota/qsd_writeback.c

index 4729c69..3c4f0fd 100644 (file)
@@ -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)