DragonFly commits List (threaded) for 2007-11
DragonFly BSD
DragonFly commits List (threaded) for 2007-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/vfs/ufs quota.h ufs_quota.c


To: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
From: Cédric Berger <cedric@xxxxxxxxx>
Date: Wed, 07 Nov 2007 15:55:50 +0100

Matthew Dillon wrote:
dillon 2007/11/06 09:11:38 PST

DragonFly src repository

Modified files:
sys/vfs/ufs quota.h ufs_quota.c Log:
When the quotacheck has not been run the quota code may have to
allocate blocks in the userquota file itself. This will deadlock the
quota system.
Disallow adjustments of quotas related to operations on the userquota file
itself, and generate a warning to the console.
Reported-by: David W <dpwalters@carolina.rr.com>
Revision Changes Path
1.9 +1 -1 src/sys/vfs/ufs/quota.h
1.25 +42 -0 src/sys/vfs/ufs/ufs_quota.c



http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/quota.h.diff?r1=1.8&r2=1.9&f=u http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/ufs_quota.c.diff?r1=1.24&r2=1.25&f=u

I was just giving a quick look at the above file, and the following code looks suspect:

+ufs_quotawarn(struct ufs_dquot *dq)
+{
+	static int dqticks;
+	if (dqticks / hz != ticks / hz) {
+		dqticks = ticks / hz;

are you sure is not more like:

+	if (dqticks != ticks / hz) {
+		dqticks = ticks / hz;

Cedric



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]