diff --git a/zfs/lib/libzpool/arc.c b/zfs/lib/libzpool/arc.c index d59dfe2d9d..4477990dcf 100644 --- a/zfs/lib/libzpool/arc.c +++ b/zfs/lib/libzpool/arc.c @@ -3491,6 +3491,7 @@ arc_fini(void) mutex_destroy(&arc_mru_ghost->arcs_mtx); mutex_destroy(&arc_mfu->arcs_mtx); mutex_destroy(&arc_mfu_ghost->arcs_mtx); + mutex_destroy(&arc_l2c_only->arcs_mtx); mutex_destroy(&zfs_write_limit_lock); diff --git a/zfs/lib/libzpool/dnode.c b/zfs/lib/libzpool/dnode.c index e0beb032a2..5fc831f213 100644 --- a/zfs/lib/libzpool/dnode.c +++ b/zfs/lib/libzpool/dnode.c @@ -56,6 +56,8 @@ dnode_cons(void *arg, void *unused, int kmflag) rw_init(&dn->dn_struct_rwlock, NULL, RW_DEFAULT, NULL); mutex_init(&dn->dn_mtx, NULL, MUTEX_DEFAULT, NULL); mutex_init(&dn->dn_dbufs_mtx, NULL, MUTEX_DEFAULT, NULL); + cv_init(&dn->dn_notxholds, NULL, CV_DEFAULT, NULL); + refcount_create(&dn->dn_holds); refcount_create(&dn->dn_tx_holds); @@ -84,6 +86,7 @@ dnode_dest(void *arg, void *unused) rw_destroy(&dn->dn_struct_rwlock); mutex_destroy(&dn->dn_mtx); mutex_destroy(&dn->dn_dbufs_mtx); + cv_destroy(&dn->dn_notxholds); refcount_destroy(&dn->dn_holds); refcount_destroy(&dn->dn_tx_holds); diff --git a/zfs/lib/libzpool/space_map.c b/zfs/lib/libzpool/space_map.c index 0a1fd59eab..e0119d1af2 100644 --- a/zfs/lib/libzpool/space_map.c +++ b/zfs/lib/libzpool/space_map.c @@ -63,6 +63,8 @@ space_map_create(space_map_t *sm, uint64_t start, uint64_t size, uint8_t shift, avl_create(&sm->sm_root, space_map_seg_compare, sizeof (space_seg_t), offsetof(struct space_seg, ss_node)); + cv_init(&sm->sm_load_cv, NULL, CV_DEFAULT, NULL); + sm->sm_start = start; sm->sm_size = size; sm->sm_shift = shift; @@ -74,6 +76,7 @@ space_map_destroy(space_map_t *sm) { ASSERT(!sm->sm_loaded && !sm->sm_loading); VERIFY3U(sm->sm_space, ==, 0); + cv_destroy(&sm->sm_load_cv); avl_destroy(&sm->sm_root); } diff --git a/zfs/lib/libzpool/txg.c b/zfs/lib/libzpool/txg.c index 2bbf2f086c..8e99ef7f26 100644 --- a/zfs/lib/libzpool/txg.c +++ b/zfs/lib/libzpool/txg.c @@ -63,6 +63,13 @@ txg_init(dsl_pool_t *dp, uint64_t txg) rw_init(&tx->tx_suspend, NULL, RW_DEFAULT, NULL); mutex_init(&tx->tx_sync_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(&tx->tx_sync_more_cv, NULL, CV_DEFAULT, NULL); + cv_init(&tx->tx_sync_done_cv, NULL, CV_DEFAULT, NULL); + cv_init(&tx->tx_quiesce_more_cv, NULL, CV_DEFAULT, NULL); + cv_init(&tx->tx_quiesce_done_cv, NULL, CV_DEFAULT, NULL); + cv_init(&tx->tx_timeout_cv, NULL, CV_DEFAULT, NULL); + cv_init(&tx->tx_exit_cv, NULL, CV_DEFAULT, NULL); + tx->tx_open_txg = txg; } @@ -77,6 +84,13 @@ txg_fini(dsl_pool_t *dp) ASSERT(tx->tx_threads == 0); + cv_destroy(&tx->tx_sync_more_cv); + cv_destroy(&tx->tx_sync_done_cv); + cv_destroy(&tx->tx_quiesce_more_cv); + cv_destroy(&tx->tx_quiesce_done_cv); + cv_destroy(&tx->tx_timeout_cv); + cv_destroy(&tx->tx_exit_cv); + rw_destroy(&tx->tx_suspend); mutex_destroy(&tx->tx_sync_lock);