freebsd-skq/sys/nfsclient
Attilio Rao 84887fa362 - Add real assertions to lockmgr locking primitives.
A couple of notes for this:
  * WITNESS support, when enabled, is only used for shared locks in order
    to avoid problems with the "disowned" locks
  * KA_HELD and KA_UNHELD only exists in the lockmgr namespace in order
    to assert for a generic thread (not curthread) owning or not the
    lock.  Really, this kind of check is bogus but it seems very
    widespread in the consumers code.  So, for the moment, we cater this
    untrusted behaviour, until the consumers are not fixed and the
    options could be removed (hopefully during 8.0-CURRENT lifecycle)
  * Implementing KA_HELD and KA_UNHELD (not surported natively by
    WITNESS) made necessary the introduction of LA_MASKASSERT which
    specifies the range for default lock assertion flags
  * About other aspects, lockmgr_assert() follows exactly what other
    locking primitives offer about this operation.

- Build real assertions for buffer cache locks on the top of
  lockmgr_assert().  They can be used with the BUF_ASSERT_*(bp)
  paradigm.

- Add checks at lock destruction time and use a cookie for verifying
  lock integrity at any operation.

- Redefine BUF_LOCKFREE() in order to not use a direct assert but
  let it rely on the aforementioned destruction time check.

KPI results evidently broken, so __FreeBSD_version bumping and
manpage update result necessary and will be committed soon.

Side note: lockmgr_assert() will be used soon in order to implement
real assertions in the vnode namespace replacing the legacy and still
bogus "VOP_ISLOCKED()" way.

Tested by:      kris (earlier version)
Reviewed by:    jhb
2008-02-13 20:44:19 +00:00
..
bootp_subr.c Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which 2007-08-06 14:26:03 +00:00
krpc_subr.c Remove the now-unused NET_{LOCK,UNLOCK,ASSERT}_GIANT() macros, which 2007-08-06 14:26:03 +00:00
krpc.h
nfs_bio.c namei() can call underlying nfs_readlink() passing a struct uio pointer 2008-02-09 20:13:19 +00:00
nfs_diskless.c Switch the default NFS mount mode from UDP to TCP. UDP mounts are a 2008-02-11 23:23:21 +00:00
nfs_lock.c Attempt to rationalize NFS privileges: 2007-04-21 18:11:19 +00:00
nfs_lock.h
nfs_nfsiod.c Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
nfs_node.c Cleanup lockmgr interface and exported KPI: 2008-01-24 12:34:30 +00:00
nfs_socket.c Consolidate the code to generate a new XID for a NFS request into a 2008-02-13 00:04:58 +00:00
nfs_subs.c Consolidate the code to generate a new XID for a NFS request into a 2008-02-13 00:04:58 +00:00
nfs_vfsops.c Conver all explicit instances to VOP_ISLOCKED(arg, NULL) into 2008-02-08 21:45:47 +00:00
nfs_vnops.c - Add real assertions to lockmgr locking primitives. 2008-02-13 20:44:19 +00:00
nfs.h NFS MP scaling changes. 2007-10-12 19:12:21 +00:00
nfsargs.h Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
nfsdiskless.h consolidate parsing of nfs root mount options in one place 2006-12-06 02:15:25 +00:00
nfsm_subs.h Consolidate the code to generate a new XID for a NFS request into a 2008-02-13 00:04:58 +00:00
nfsmount.h NFS MP scaling changes. 2007-10-12 19:12:21 +00:00
nfsnode.h namei() can call underlying nfs_readlink() passing a struct uio pointer 2008-02-09 20:13:19 +00:00
nfsstats.h
nlminfo.h - Fix leak of struct nlminfo on process exit. 2005-10-26 07:18:37 +00:00