diff options
Diffstat (limited to 'sys/ufs/ufs/ufs_quota.c')
-rw-r--r-- | sys/ufs/ufs/ufs_quota.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 1baf165..18cbcd3 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -164,6 +164,11 @@ chkdq(ip, change, cred, flags) dq->dq_flags |= DQ_WANT; (void) tsleep((caddr_t)dq, PINOD+1, "chkdq2", 0); } + /* Reset timer when crossing soft limit */ + if (dq->dq_curblocks + change >= dq->dq_bsoftlimit && + dq->dq_curblocks < dq->dq_bsoftlimit) + dq->dq_btime = time_second + + VFSTOUFS(ITOV(ip)->v_mount)->um_btime[i]; dq->dq_curblocks += change; dq->dq_flags |= DQ_MOD; } @@ -280,6 +285,11 @@ chkiq(ip, change, cred, flags) dq->dq_flags |= DQ_WANT; (void) tsleep((caddr_t)dq, PINOD+1, "chkiq2", 0); } + /* Reset timer when crossing soft limit */ + if (dq->dq_curinodes + change >= dq->dq_isoftlimit && + dq->dq_curinodes < dq->dq_isoftlimit) + dq->dq_itime = time_second + + VFSTOUFS(ITOV(ip)->v_mount)->um_itime[i]; dq->dq_curinodes += change; dq->dq_flags |= DQ_MOD; } |