diff options
author | mpp <mpp@FreeBSD.org> | 2007-02-04 06:46:57 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 2007-02-04 06:46:57 +0000 |
commit | 2ba513e47f4fe548ae1cdc74707b7683b4c6d1c7 (patch) | |
tree | 8fcbc53bd25fd7902579a7563c5ca606bf5e6ddf /sys/ufs | |
parent | 98f50a3dfb06cb3bac2ec6f46d265c037ca5fc3d (diff) | |
download | FreeBSD-src-2ba513e47f4fe548ae1cdc74707b7683b4c6d1c7.zip FreeBSD-src-2ba513e47f4fe548ae1cdc74707b7683b4c6d1c7.tar.gz |
If quotacheck or edquota reset the block or inode grace time for
a user or group, when the kernel first sees this, it will update
the grace time value. However, it never flags the quota as modified
and the updated value never makes it to the quota data file unless
the user actually makes some other change that would write the
data out.
Fixed to flag the quota as modified if the soft limit has actually
been reached and should be now enforced.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_quota.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index d86e26e..7d46f96 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -987,10 +987,18 @@ dqget(vp, id, ump, type, dqp) dq->dq_ihardlimit == 0 && dq->dq_bhardlimit == 0) dq->dq_flags |= DQ_FAKE; if (dq->dq_id != 0) { - if (dq->dq_btime == 0) + if (dq->dq_btime == 0) { dq->dq_btime = time_second + ump->um_btime[type]; - if (dq->dq_itime == 0) + if (dq->dq_bsoftlimit && + dq->dq_curblocks >= dq->dq_bsoftlimit) + dq->dq_flags |= DQ_MOD; + } + if (dq->dq_itime == 0) { dq->dq_itime = time_second + ump->um_itime[type]; + if (dq->dq_isoftlimit && + dq->dq_curinodes >= dq->dq_isoftlimit) + dq->dq_flags |= DQ_MOD; + } } *dqp = dq; return (0); |