freebsd-nq/sys/cddl
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
..
boot/zfs Add definitions for ZFS pool version 13. 2008-11-21 09:10:35 +00:00
compat/opensolaris Introduce the extensible jail framework, using the same "name=value" 2009-04-29 21:14:15 +00:00
contrib/opensolaris Asynchronously release vnodes to avoid blocking on range locks when calling back in to zfs. 2009-05-07 20:28:06 +00:00
dev Move dtnfsclient.c in the cddl tree to nfs_kdtrace.c in the nfsclient 2009-03-25 17:47:22 +00:00