freebsd-dev/sys/cam/scsi
Konstantin Belousov d8b0556c6d Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields [1]. The locking assumes
that shared vnode lock is held, thus we get exclusive access to knote
either by exclusive vnode lock protection, or by shared vnode lock +
vnode interlock.

Do not use kl_locked() method to assert either lock ownership or the
fact that curthread does not own the lock. For shared locks, ownership
is not recorded, e.g. VOP_ISLOCKED can return LK_SHARED for the shared
lock not owned by curthread, causing false positives in kqueue subsystem
assertions about knlist lock.

Remove kl_locked method from knlist lock vector, and add two separate
assertion methods kl_assert_locked and kl_assert_unlocked, that are
supposed to use proper asserts. Change knlist_init accordingly.

Add convenience function knlist_init_mtx to reduce number of arguments
for typical knlist initialization.

Submitted by:	jhb [1]
Noted by:	jhb [2]
Reviewed by:	jhb
Tested by:	rnoland
2009-06-10 20:59:32 +00:00
..
scsi_all.c Add missing 'break' statement. 2009-01-14 21:25:17 +00:00
scsi_all.h Update SCSI opcodes and ASCs from t10.org. 2008-08-07 17:25:05 +00:00
scsi_cd.c Reorder dacleanup() and cdcleanup() slightly so that the sysctl context is 2009-02-11 22:29:09 +00:00
scsi_cd.h
scsi_ch.c Don't call destroy_dev(9) with a mutex held. While here, shuffle 2009-01-10 17:22:49 +00:00
scsi_ch.h
scsi_da.c Reorder dacleanup() and cdcleanup() slightly so that the sysctl context is 2009-02-11 22:29:09 +00:00
scsi_da.h
scsi_dvcfg.h
scsi_iu.h
scsi_low_pisa.c
scsi_low_pisa.h
scsi_low.c Don't leak memory when alloc fails. 2009-01-23 21:06:16 +00:00
scsi_low.h Add a new 'why' argument to kdb_enter(), and a set of constants to use 2007-12-25 17:52:02 +00:00
scsi_message.h
scsi_pass.c Remove dead code. 2009-05-12 16:38:32 +00:00
scsi_pass.h
scsi_pt.c Don't call destroy_dev(9) with a mutex held. While here, shuffle 2009-01-10 17:22:49 +00:00
scsi_pt.h
scsi_sa.c Get rid of the device index number stored in the sa(4) unit number. 2009-04-20 10:40:42 +00:00
scsi_sa.h
scsi_ses.c Remove unused SESUNIT() macro from ses(4). 2009-04-18 07:39:11 +00:00
scsi_ses.h Fix ioctl to not get swallowed by ioctl code (i.e., make sure the darned 2006-01-18 08:37:27 +00:00
scsi_sg.c Add missing 'break' statements. 2009-05-12 15:03:47 +00:00
scsi_sg.h A fix for the SG_GET_TIMEOUT function slipped into a previous commit by 2007-04-10 20:03:42 +00:00
scsi_targ_bh.c Add a helper function for registering async callbacks. Besides 2007-05-16 16:54:23 +00:00
scsi_target.c Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use 2009-06-10 20:59:32 +00:00
scsi_targetio.h