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.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Serapheim Dimitropoulos <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Signed-off-by: Tom Caputi <[email protected]>
Closes openzfs#8010
  • Loading branch information
Tom Caputi authored and Gregor Kopka committed Jan 7, 2019
1 parent 9e836a1 commit 2905966
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 2905966

Please sign in to comment.