Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 2003 10:23:50 -0800 (PST)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ufs/ufs ufsmount.h src/sys/ufs/ffs ffs_softdep.c
Message-ID:  <200301071823.h07INoKL073722@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
mckusick    2003/01/07 10:23:50 PST

  Modified files:
    sys/ufs/ufs          ufsmount.h 
    sys/ufs/ffs          ffs_softdep.c 
  Log:
  This patch fixes a problem caused by applications that rapidly and
  repeatedly truncate the same file. Each time the file is truncated,
  a buffer is grabbed to store the indirect block numbers that need
  to be freed. Those blocks cannot be freed until the inode claiming
  them is written to disk. Thus, the number of buffers being held by
  soft updates explodes and in extreme cases can run the kernel out
  of buffers. The problem can be avoided by doing an fsync on the
  file every debug.maxindirdep truncates (currently defaulted to 50).
  The fsync causes the inode to be written so that the held buffers
  can be freed. The check for excessive buffers is checked as part
  of the existing hook for excessive dependencies (softdep_slowdown)
  in the truncate code.
  
  Reported by:    David Schultz <dschultz@uclink.Berkeley.EDU>
  Sponsored by:   DARPA & NAI Labs.
  MFC after:      3 weeks
  
  Revision  Changes    Path
  1.132     +12 -5     src/sys/ufs/ffs/ffs_softdep.c
  1.28      +1 -0      src/sys/ufs/ufs/ufsmount.h

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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