Skip to content

Commit

Permalink
3085 zfs diff panics, then panics in a loop on booting
Browse files Browse the repository at this point in the history
Reviewed by: Matt Ahrens <[email protected]>
Approved by: Richard Lowe <[email protected]>
  • Loading branch information
Christopher Siden committed Aug 16, 2012
1 parent b798e01 commit 347eec8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions usr/src/uts/common/fs/zfs/dsl_dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -3903,6 +3903,10 @@ dsl_dataset_user_release_sync(void *arg1, void *tag, dmu_tx_t *tx)
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};
Expand All @@ -3913,9 +3917,6 @@ dsl_dataset_user_release_sync(void *arg1, void *tag, dmu_tx_t *tx)
/* 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
Expand Down
4 changes: 3 additions & 1 deletion usr/src/uts/common/fs/zfs/spa_history.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,10 @@ log_internal(nvlist_t *nvl, const char *operation, spa_t *spa,
* 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);
Expand Down

0 comments on commit 347eec8

Please sign in to comment.