freebsd-dev/sys/cddl/contrib/opensolaris/uts/common
Kip Macy 62fa227ccd Asynchronously release vnodes to avoid blocking on range locks when calling back in to zfs.
This is based on a fix that went in to opensolaris on March 9th. However, it uses a dedicated
thread instead of a Solaris' taskq to avoid doing a blocking memory allocation with the vnode
interlock held.

This fixes a long-time deadlock in ZFS. This is not, strictly speaking, an LOR. The spa_zio
thread releases a vnode, this calls in to vn_reclaim which in turn needs to acquire range locks
to sync dirty data out to disk. The range locks are already held by a user-level process waiting
on a condition variable that it the process is waiting on a spa_zio thread to signal it on. The
process could not be signalled because the spa_zio thread could not proceed.

The nature of this problem was not apparent due to ZFS locks opting out of witness which meant
that DDB did not know about the locks that were held by ZFS.

Reviewed by:	pjd
MFC after:	7 days
2009-05-07 20:28:06 +00:00
..
ctf This commit was generated by cvs2svn to compensate for changes in r179193, 2008-05-22 07:04:10 +00:00
dtrace Merge latest DTrace changes from Perforce. 2008-11-05 19:39:11 +00:00
fs Asynchronously release vnodes to avoid blocking on range locks when calling back in to zfs. 2009-05-07 20:28:06 +00:00
os Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. 2008-11-17 20:49:29 +00:00
rpc Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. 2008-11-17 20:49:29 +00:00
sys Asynchronously release vnodes to avoid blocking on range locks when calling back in to zfs. 2009-05-07 20:28:06 +00:00
zmod Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. 2008-11-17 20:49:29 +00:00
Makefile.files Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. 2008-11-17 20:49:29 +00:00