summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2003-01-07 18:23:50 +0000
committermckusick <mckusick@FreeBSD.org>2003-01-07 18:23:50 +0000
commitdb74e87c2dcb58da63b72f52910212ace4c8406f (patch)
tree06b118b7f3c3d10725186e047096ac48d7d7c9e8 /sys/kern/vfs_bio.c
parent09a741fae61bb411204d6d533ec4670c5f416c37 (diff)
downloadFreeBSD-src-db74e87c2dcb58da63b72f52910212ace4c8406f.zip
FreeBSD-src-db74e87c2dcb58da63b72f52910212ace4c8406f.tar.gz
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
Diffstat (limited to 'sys/kern/vfs_bio.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud