From owner-freebsd-bugs Mon Sep 22 09:28:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA24270 for bugs-outgoing; Mon, 22 Sep 1997 09:28:54 -0700 (PDT) Received: from elvis.vnet.net (elvis.vnet.net [166.82.1.5]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA24226; Mon, 22 Sep 1997 09:28:34 -0700 (PDT) Received: from ponds.dignus.com (ponds.vnet.net [166.82.177.48]) by elvis.vnet.net (8.8.5/8.8.4) with ESMTP id MAA23970; Mon, 22 Sep 1997 12:28:29 -0400 (EDT) Received: from lakes.dignus.com (lakes [10.0.0.3]) by ponds.dignus.com (8.8.5/8.8.5) with ESMTP id MAA05632; Mon, 22 Sep 1997 12:43:55 -0400 (EDT) Received: (from rivers@localhost) by lakes.dignus.com (8.8.5/8.6.9) id MAA00404; Mon, 22 Sep 1997 12:34:32 -0400 (EDT) Date: Mon, 22 Sep 1997 12:34:32 -0400 (EDT) From: Thomas David Rivers Message-Id: <199709221634.MAA00404@lakes.dignus.com> To: rivers@dignus.com, wosch@cs.tu-berlin.de Subject: Re: kern/3398 Cc: freebsd-bugs@FreeBSD.ORG, phk@FreeBSD.ORG, wosch@apfel.de Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > On Fri, Sep 19, 1997 at 08:19:18AM -0400, Thomas David Rivers wrote: > > > Synopsis: off by one error in ffs_alloc > > I've been off the list for a while - can someone relate > > the details of this - in particular, the patch (or, just > > point me to it...) > > See the CVS Repository > > http://www.freebsd.org/cgi/cvsweb.cgi -> > src/sys/ufs/ffs/ffs_alloc.c > > -- > Wolfram Schneider http://www.apfel.de/~wosch/ > Hey! That was great! I didn't know there was a cvs <-> cgi interface... it worked wonderfully... Anyway - it seems to me the issue could be what I've experienced with 2.2.2-RELEASE.... here's the diff I will be trying there.. I'll report my findings... - Dave Rivers - ------------- cut here --------------------------- *** ffs_alloc.c.ori Wed Mar 26 15:05:50 1997 --- ffs_alloc.c Mon Sep 22 12:33:21 1997 *************** *** 121,127 **** #endif /* DIAGNOSTIC */ if (size == fs->fs_bsize && fs->fs_cstotal.cs_nbfree == 0) goto nospace; ! if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) <= 0) goto nospace; #ifdef QUOTA error = chkdq(ip, (long)btodb(size), cred, 0); --- 121,128 ---- #endif /* DIAGNOSTIC */ if (size == fs->fs_bsize && fs->fs_cstotal.cs_nbfree == 0) goto nospace; ! if (cred->cr_uid != 0 && ! freespace(fs, fs->fs_minfree) - numfrags(fs, size) < 0) goto nospace; #ifdef QUOTA error = chkdq(ip, (long)btodb(size), cred, 0); *************** *** 190,196 **** if (cred == NOCRED) panic("ffs_realloccg: missing credential"); #endif /* DIAGNOSTIC */ ! if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) <= 0) goto nospace; if ((bprev = ip->i_db[lbprev]) == 0) { printf("dev = 0x%lx, bsize = %ld, bprev = %ld, fs = %s\n", --- 191,198 ---- if (cred == NOCRED) panic("ffs_realloccg: missing credential"); #endif /* DIAGNOSTIC */ ! if (cred->cr_uid != 0 && ! freespace(fs, fs->fs_minfree) - numfrags(fs, nsize - osize) < 0) goto nospace; if ((bprev = ip->i_db[lbprev]) == 0) { printf("dev = 0x%lx, bsize = %ld, bprev = %ld, fs = %s\n",