If you need tips & tricks, here they are...

Joomla! AddThis


FreeBSD 9.0 issues with Quota

FreeBSD 9.0 issues with Quota

There is an issue with FreeBSD 9.0-RELEASE and Quota with a UFS2+SoftUpdate. Apparently it doesn't update the quota file as it should.

I found this in the freebsd-stable mail-list archive.


This is a bug in +J code (even if you do not use +J). Do you have softupdates enabled on the volume ? If yes, try the following patch.

diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index 5b4b6b9..ed2db79 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -43,6 +43,7 @@

#include "opt_ffs.h"
+#include "opt_quota.h"
#include "opt_ddb.h"

@@ -6428,7 +6429,7 @@ softdep_setup_freeblocks(ip, length, flags)
#ifdef QUOTA
/* Reference the quotas in case the block count is wrong in the end. */
- quotaref(vp, freeblks->fb_quota);
+ quotaref(ITOV(ip), freeblks->fb_quota);
(void) chkdq(ip, -datablocks, NOCRED, 0);
freeblks->fb_chkcnt = -datablocks;

I have tried this patch and it is working as it should!

Add comment

Security code

Please consider supporting our efforts.

Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok Decline