From owner-cvs-all Tue Jan 7 10:23:52 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E70D437B401; Tue, 7 Jan 2003 10:23:50 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FCD243E4A; Tue, 7 Jan 2003 10:23:50 -0800 (PST) (envelope-from mckusick@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h07INofh073723; Tue, 7 Jan 2003 10:23:50 -0800 (PST) (envelope-from mckusick@repoman.freebsd.org) Received: (from mckusick@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h07INoKL073722; Tue, 7 Jan 2003 10:23:50 -0800 (PST) Message-Id: <200301071823.h07INoKL073722@repoman.freebsd.org> From: Kirk McKusick Date: Tue, 7 Jan 2003 10:23:50 -0800 (PST) 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 X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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