Skip to content

Commit

Permalink
Fix ASSERT in zil_create() during ztest
Browse files Browse the repository at this point in the history
This patch corrects an ASSERT in zil_create() that will only be
true if the call to zio_alloc_zil() does not fail.

TEST_ZTEST_TIMEOUT=3600

Signed-off-by: Tom Caputi <[email protected]>
  • Loading branch information
Tom Caputi committed Oct 19, 2018
1 parent 6ce063b commit 11f6d39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/zfs/zil.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,8 @@ zil_create(zilog_t *zilog)
txg_wait_synced(zilog->zl_dmu_pool, txg);
}

ASSERT(bcmp(&blk, &zh->zh_log, sizeof (blk)) == 0);
ASSERT(error != 0 || bcmp(&blk, &zh->zh_log, sizeof (blk)) == 0);
IMPLY(error == 0, lwb != NULL);

return (lwb);
}
Expand Down

0 comments on commit 11f6d39

Please sign in to comment.