comparison 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
comparison
equal deleted inserted replaced
13972:e844373201f4 13973:4972ab336f54
70 rw_init(&dn->dn_struct_rwlock, NULL, RW_DEFAULT, NULL); 70 rw_init(&dn->dn_struct_rwlock, NULL, RW_DEFAULT, NULL);
71 mutex_init(&dn->dn_mtx, NULL, MUTEX_DEFAULT, NULL); 71 mutex_init(&dn->dn_mtx, NULL, MUTEX_DEFAULT, NULL);
72 mutex_init(&dn->dn_dbufs_mtx, NULL, MUTEX_DEFAULT, NULL); 72 mutex_init(&dn->dn_dbufs_mtx, NULL, MUTEX_DEFAULT, NULL);
73 cv_init(&dn->dn_notxholds, NULL, CV_DEFAULT, NULL); 73 cv_init(&dn->dn_notxholds, NULL, CV_DEFAULT, NULL);
74 74
75 refcount_create(&dn->dn_holds); 75 /*
76 * Every dbuf has a reference, and dropping a tracked reference is
77 * O(number of references), so don't track dn_holds.
78 */
79 refcount_create_untracked(&dn->dn_holds);
76 refcount_create(&dn->dn_tx_holds); 80 refcount_create(&dn->dn_tx_holds);
77 list_link_init(&dn->dn_link); 81 list_link_init(&dn->dn_link);
78 82
79 bzero(&dn->dn_next_nblkptr[0], sizeof (dn->dn_next_nblkptr)); 83 bzero(&dn->dn_next_nblkptr[0], sizeof (dn->dn_next_nblkptr));
80 bzero(&dn->dn_next_nlevels[0], sizeof (dn->dn_next_nlevels)); 84 bzero(&dn->dn_next_nlevels[0], sizeof (dn->dn_next_nlevels));