diff usr/src/uts/common/fs/zfs/dnode.c @ 13973:4972ab336f54

3464 zfs synctask code needs restructuring Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org>
author Matthew Ahrens <mahrens@delphix.com>
date Thu, 28 Feb 2013 12:44:05 -0800
parents e3a9ae14a119
children d7059eb1884c
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/dnode.c	Wed Feb 27 21:13:42 2013 +0100
+++ b/usr/src/uts/common/fs/zfs/dnode.c	Thu Feb 28 12:44:05 2013 -0800
@@ -72,7 +72,11 @@
 	mutex_init(&dn->dn_dbufs_mtx, NULL, MUTEX_DEFAULT, NULL);
 	cv_init(&dn->dn_notxholds, NULL, CV_DEFAULT, NULL);
 
-	refcount_create(&dn->dn_holds);
+	/*
+	 * Every dbuf has a reference, and dropping a tracked reference is
+	 * O(number of references), so don't track dn_holds.
+	 */
+	refcount_create_untracked(&dn->dn_holds);
 	refcount_create(&dn->dn_tx_holds);
 	list_link_init(&dn->dn_link);