kern/166840: [quota] used block count increases but does not
decrease
Erwin Van de Velde
erwin.vandevelde at gmail.com
Mon May 7 09:40:08 UTC 2012
The following reply was made to PR kern/166840; it has been noted by GNATS.
From: Erwin Van de Velde <erwin.vandevelde at gmail.com>
To: bug-followup at freebsd.org, johan.bergs at gmail.com
Cc:
Subject: Re: kern/166840: [quota] used block count increases but does not decrease
Date: Mon, 7 May 2012 11:26:51 +0200
--14dae9340bdff4314c04bf6edfc3
Content-Type: text/plain; charset=ISO-8859-1
Found another problem report pointing to this (Thanks to koobs, Barnerd
from IRC :-) ):
- PR Kern/164734
Potential patch (
http://tips.paddyonline.net/index.php/FreeBSD_9.0_issues_with_Quota):
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;
Did not test it myself yet.
--14dae9340bdff4314c04bf6edfc3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Found another problem report pointing to this (Thanks to koobs, Barnerd fro=
m IRC :-) ):<div>- PR Kern/164734</div><div><br></div><div><br></div><div>P=
otential patch (<a href=3D"http://tips.paddyonline.net/index.php/FreeBSD_9.=
0_issues_with_Quota">http://tips.paddyonline.net/index.php/FreeBSD_9.0_issu=
es_with_Quota</a>):</div>
<div><br></div><div><div>diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/f=
fs/ffs_softdep.c</div><div>index 5b4b6b9..ed2db79 100644</div><div>--- a/sy=
s/ufs/ffs/ffs_softdep.c</div><div>+++ b/sys/ufs/ffs/ffs_softdep.c</div>
<div>@@ -43,6 +43,7 @@</div><div>=A0__FBSDID("$FreeBSD$");</div><=
div>=A0</div><div>=A0#include "opt_ffs.h"</div><div>+#include &qu=
ot;opt_quota.h"</div><div>=A0#include "opt_ddb.h"</div><div>=
=A0</div>
<div>=A0/*</div><div>@@ -6428,7 +6429,7 @@ softdep_setup_freeblocks(ip, len=
gth, flags)</div><div>=A0<span class=3D"Apple-tab-span" style=3D"white-spac=
e:pre"> </span>}</div><div>=A0#ifdef QUOTA</div><div>=A0<span class=3D"Appl=
e-tab-span" style=3D"white-space:pre"> </span>/* Reference the quotas in ca=
se the block count is wrong in the end. */</div>
<div>-<span class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>quot=
aref(vp, freeblks->fb_quota);</div><div>+<span class=3D"Apple-tab-span" =
style=3D"white-space:pre"> </span>quotaref(ITOV(ip), freeblks->fb_quota)=
;</div>
<div>=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>(v=
oid) chkdq(ip, -datablocks, NOCRED, 0);</div><div>=A0#endif</div><div>=A0<s=
pan class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>freeblks->=
;fb_chkcnt =3D -datablocks;</div>
</div><div><br></div><div><br></div><div>Did not test it myself yet.</div><=
div><br></div>
--14dae9340bdff4314c04bf6edfc3--
More information about the freebsd-bugs
mailing list