[follow up to myself...]
On Wed, 01-Mar-2000 at 22:19:56 +0100, Andre Albsmeier wrote:
> Here is a problem with FreeBSD's quotas that I have observed
> for a long time now but finally found some time to track it down:
>
> Let's assume the following settings on a quota enabled system:
>
> soft limits : 100MB
> hard limits : 200MB
> grace period: 7 days
>
> ...
>
> --- /sys/ufs/ufs/ufs_quota.c Mon Aug 30 17:56:23 1999
> +++ ufs_quota.c Wed Mar 1 21:27:14 2000
> @@ -163,6 +163,10 @@
> (void) tsleep((caddr_t)dq, PINOD+1, "chkdq2", 0);
> }
> dq->dq_curblocks += change;
> /* check if we hit the soft limits */
> + if (dq->dq_curblocks >= dq->dq_bsoftlimit && dq->dq_bsoftlimit)
> /* check if we have been below the soft limits before */
> + if (dq->dq_curblocks - change < dq->dq_bsoftlimit)
> /* yes, update the timer */
> + dq->dq_btime = time_second +
> + VFSTOUFS(ITOV(ip)->v_mount)->um_btime[i];
> dq->dq_flags |= DQ_MOD;
> }
> return (0);
> @@ -279,6 +283,10 @@
> (void) tsleep((caddr_t)dq, PINOD+1, "chkiq2", 0);
> }
> dq->dq_curinodes += change;
> /* same as above for inodes */
> + if (dq->dq_curinodes >= dq->dq_isoftlimit && dq->dq_isoftlimit)
> + if (dq->dq_curinodes - change < dq->dq_isoftlimit)
> + dq->dq_itime = time_second +
> + VFSTOUFS(ITOV(ip)->v_mount)->um_itime[i];
> dq->dq_flags |= DQ_MOD;
> }
> return (0);
>
Couldn't stand waiting any longer so I tried it on a test
box and it seems to work :-). However, I am interested in
hearing the opinion from the filesystem specialists if
the issue:
a) is really a bug
b) can be fixed (changed) with the above patch properly
Thanks to all in advance,
-Andre
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message