tips.paddyonline.net

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

Joomla! AddThis

Share

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 @@
__FBSDID("$FreeBSD$");

#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);
#endif
freeblks->fb_chkcnt = -datablocks;

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

Add comment

Security code
Refresh

Please consider supporting our efforts.


We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.