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 <tcaputi@datto.com>
  • Loading branch information
Tom Caputi committed Oct 11, 2018
1 parent acb4494 commit c25607e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/zfs/zil.c
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 c25607e

Please sign in to comment.