changeset 13772:2579580ac955

3085 zfs diff panics, then panics in a loop on booting Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Christopher Siden <chris.siden@delphix.com>
date Thu, 16 Aug 2012 15:11:17 -0400
parents 2903afd49fe8
children 00c2a08cf1bb
files usr/src/uts/common/fs/zfs/dsl_dataset.c usr/src/uts/common/fs/zfs/spa_history.c
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/dsl_dataset.c	Mon Aug 13 14:39:38 2012 -0400
+++ b/usr/src/uts/common/fs/zfs/dsl_dataset.c	Thu Aug 16 15:11:17 2012 -0400
@@ -3903,6 +3903,10 @@
 	VERIFY(error == 0 || error == ENOENT);
 	zapobj = ds->ds_phys->ds_userrefs_obj;
 	VERIFY(0 == zap_remove(mos, zapobj, ra->htag, tx));
+
+	spa_history_log_internal_ds(ds, "release", tx,
+	    "tag = %s refs now = %lld", ra->htag, (longlong_t)refs);
+
 	if (ds->ds_userrefs == 0 && ds->ds_phys->ds_num_children == 1 &&
 	    DS_IS_DEFER_DESTROY(ds)) {
 		struct dsl_ds_destroyarg dsda = {0};
@@ -3913,9 +3917,6 @@
 		/* We already did the destroy_check */
 		dsl_dataset_destroy_sync(&dsda, tag, tx);
 	}
-
-	spa_history_log_internal_ds(ds, "release", tx,
-	    "tag = %s refs now = %lld", ra->htag, (longlong_t)refs);
 }
 
 static int
--- a/usr/src/uts/common/fs/zfs/spa_history.c	Mon Aug 13 14:39:38 2012 -0400
+++ b/usr/src/uts/common/fs/zfs/spa_history.c	Thu Aug 16 15:11:17 2012 -0400
@@ -440,8 +440,10 @@
 	 * If this is part of creating a pool, not everything is
 	 * initialized yet, so don't bother logging the internal events.
 	 */
-	if (tx->tx_txg == TXG_INITIAL)
+	if (tx->tx_txg == TXG_INITIAL) {
+		fnvlist_free(nvl);
 		return;
+	}
 
 	msg = kmem_alloc(vsnprintf(NULL, 0, fmt, adx) + 1, KM_SLEEP);
 	(void) vsprintf(msg, fmt, adx);