Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   thorpej
Date:           Tue Sep 21 03:10:36 UTC 2004

Modified Files:
        src/sys/conf: files
        src/sys/kern: vfs_subr.c vnode_if.sh vnode_if.src
        src/sys/sys: vnode.h
        src/sys/ufs/ext2fs: ext2fs_vfsops.c ext2fs_vnops.c
        src/sys/ufs/ffs: ffs_vfsops.c
        src/sys/ufs/ufs: ufs_vnops.c

Log Message:
Add a new VNODE_LOCKDEBUG option, which enables checks in the VOP_*()
calls to ensure that the vnode lock state is as expected when the VOP
call is made.  Modify vnode_if.src to set the expected state according
to the documenting lock table for each VOP.  Modify vnode_if.sh to emit
the checks.

Notes:
- The checks are only performed if the vnode has the VLOCKSWORK bit
  set.  Some file systems (e.g. specfs) don't even bother with vnode
  locks, so of course the checks will fail.
- We can't actually run with VNODE_LOCKDEBUG because there are so many
  vnode locking problems, not the least of which is the "use SHARED for
  VOP_READ()" issue, which screws things up for the entire call chain.

Inspired by similar changes in OpenBSD, but implemented differently.


To generate a diff of this commit:
cvs rdiff -r1.684 -r1.685 src/sys/conf/files
cvs rdiff -r1.233 -r1.234 src/sys/kern/vfs_subr.c
cvs rdiff -r1.34 -r1.35 src/sys/kern/vnode_if.sh
cvs rdiff -r1.40 -r1.41 src/sys/kern/vnode_if.src
cvs rdiff -r1.125 -r1.126 src/sys/sys/vnode.h
cvs rdiff -r1.75 -r1.76 src/sys/ufs/ext2fs/ext2fs_vfsops.c
cvs rdiff -r1.56 -r1.57 src/sys/ufs/ext2fs/ext2fs_vnops.c
cvs rdiff -r1.154 -r1.155 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -r1.122 -r1.123 src/sys/ufs/ufs/ufs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index