summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2009-05-07 20:28:06 +0000
committerkmacy <kmacy@FreeBSD.org>2009-05-07 20:28:06 +0000
commit54e76e600e5758a0c21cdeeca3790d960269bd4d (patch)
tree1b45eff9b57ba71565020f61aa08a49d943f2ad1 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
parent35d0919f73b2c1f73aa5af18b5242d425502e00e (diff)
downloadFreeBSD-src-54e76e600e5758a0c21cdeeca3790d960269bd4d.zip
FreeBSD-src-54e76e600e5758a0c21cdeeca3790d960269bd4d.tar.gz
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
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
index 377efb9..1fb1c6f 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
@@ -1199,6 +1199,7 @@ dmu_init(void)
void
dmu_fini(void)
{
+ vn_rele_async_fini();
arc_fini();
dnode_fini();
dbuf_fini();
OpenPOWER on IntegriCloud