]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reviewed by: Many at differnt times in differnt parts,
authorJulian Elischer <julian@FreeBSD.org>
Fri, 12 Mar 1999 02:24:58 +0000 (02:24 +0000)
committerJulian Elischer <julian@FreeBSD.org>
Fri, 12 Mar 1999 02:24:58 +0000 (02:24 +0000)
commit4ef2094e457b4e11e04bb4e2c70ea3bf57cf9ac3
tree45b7ce4c6bfa5f186dd372ee2194509ea0186cca
parented1ff184f320feeed3d731f03ab20cadb9a3d9ef
Reviewed by: Many at differnt times in differnt parts,
including alan, john, me, luoqi, and kirk
Submitted by: Matt Dillon <dillon@frebsd.org>

This change implements a relatively sophisticated fix to getnewbuf().
There were two problems with getnewbuf(). First, the writerecursion
can lead to a system stack overflow when you have NFS and/or VN
devices in the system. Second, the free/dirty buffer accounting was
completely broken. Not only did the nfs routines blow it trying to
manually account for the buffer state, but the accounting that was
done did not work well with the purpose of their existance: figuring
out when getnewbuf() needs to sleep.

The meat of the change is to kern/vfs_bio.c. The remaining diffs are
all minor except for NFS, which includes both the fixes for bp
interaction AND fixes for a 'biodone(): buffer already done' lockup.
Sys/buf.h also contains a chaining structure which is not used by
this patchset but is used by other patches that are coming soon.
This patch deliniated by tags PRE_MAT_GETBUF and POST_MAT_GETBUF.
(sorry for the missing T matt)
sys/kern/vfs_bio.c
sys/kern/vfs_cluster.c
sys/kern/vfs_export.c
sys/kern/vfs_subr.c
sys/nfs/nfs_bio.c
sys/nfs/nfs_vnops.c
sys/nfsclient/nfs_bio.c
sys/nfsclient/nfs_vnops.c
sys/sys/bio.h
sys/sys/buf.h
sys/sys/proc.h