svn commit: r208372 -
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Martin Matuska
mm at FreeBSD.org
Fri May 21 09:35:28 UTC 2010
Author: mm
Date: Fri May 21 09:35:28 2010
New Revision: 208372
URL: http://svn.freebsd.org/changeset/base/208372
Log:
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
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri May 21 08:55:18 2010 (r208371)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri May 21 09:35:28 2010 (r208372)
@@ -53,10 +53,11 @@ dnode_cons(void *arg, void *unused, int
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);
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Fri May 21 08:55:18 2010 (r208371)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Fri May 21 09:35:28 2010 (r208372)
@@ -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
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));
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Fri May 21 08:55:18 2010 (r208371)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Fri May 21 09:35:28 2010 (r208372)
@@ -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;
More information about the svn-src-head
mailing list