Reorder some already introduced locking variables.
OpenSolaris onnv revision: 8214:d7abf7c1f1c1 Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6747934) MFC after: 3 days
This commit is contained in:
parent
911e1f9b1d
commit
370227d241
@ -53,10 +53,11 @@ dnode_cons(void *arg, void *unused, int kmflag)
|
||||
dnode_t *dn = arg;
|
||||
bzero(dn, sizeof (dnode_t));
|
||||
|
||||
cv_init(&dn->dn_notxholds, NULL, CV_DEFAULT, NULL);
|
||||
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);
|
||||
|
||||
@ -82,10 +83,10 @@ dnode_dest(void *arg, void *unused)
|
||||
int i;
|
||||
dnode_t *dn = arg;
|
||||
|
||||
cv_destroy(&dn->dn_notxholds);
|
||||
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);
|
||||
|
||||
|
@ -23,8 +23,6 @@
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#pragma ident "%Z%%M% %I% %E% SMI"
|
||||
|
||||
#include <sys/zfs_context.h>
|
||||
#include <sys/spa.h>
|
||||
#include <sys/dmu.h>
|
||||
@ -61,6 +59,7 @@ space_map_create(space_map_t *sm, uint64_t start, uint64_t size, uint8_t shift,
|
||||
bzero(sm, sizeof (*sm));
|
||||
|
||||
cv_init(&sm->sm_load_cv, NULL, CV_DEFAULT, NULL);
|
||||
|
||||
avl_create(&sm->sm_root, space_map_seg_compare,
|
||||
sizeof (space_seg_t), offsetof(struct space_seg, ss_node));
|
||||
|
||||
|
@ -79,6 +79,7 @@ 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);
|
||||
@ -99,14 +100,15 @@ txg_fini(dsl_pool_t *dp)
|
||||
|
||||
ASSERT(tx->tx_threads == 0);
|
||||
|
||||
cv_destroy(&tx->tx_exit_cv);
|
||||
cv_destroy(&tx->tx_quiesce_done_cv);
|
||||
cv_destroy(&tx->tx_quiesce_more_cv);
|
||||
cv_destroy(&tx->tx_sync_done_cv);
|
||||
cv_destroy(&tx->tx_sync_more_cv);
|
||||
rw_destroy(&tx->tx_suspend);
|
||||
mutex_destroy(&tx->tx_sync_lock);
|
||||
|
||||
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_exit_cv);
|
||||
|
||||
for (c = 0; c < max_ncpus; c++) {
|
||||
int i;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user