Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 1997 12:34:32 -0400 (EDT)
From:      Thomas David Rivers <rivers@dignus.com>
To:        rivers@dignus.com, wosch@cs.tu-berlin.de
Cc:        freebsd-bugs@FreeBSD.ORG, phk@FreeBSD.ORG, wosch@apfel.de
Subject:   Re: kern/3398
Message-ID:  <199709221634.MAA00404@lakes.dignus.com>

next in thread | raw e-mail | index | archive | help
> 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   <wosch@apfel.de>   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",






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709221634.MAA00404>