Assert if we're logging after final txg was set
commitd2b0ca953f16d7b33f747369fceb55a89eb51b2e
authorPavel Snajdr <snajpa@snajpa.net>
Mon, 25 Nov 2024 23:37:56 +0000 (26 00:37 +0100)
committerGitHub <noreply@github.com>
Mon, 25 Nov 2024 23:37:56 +0000 (25 18:37 -0500)
tree39c35a578a36692a4508dbcc1b690d8b10031f9e
parentd0a91b9f88a47316158508bf304a61baa8c99c10
Assert if we're logging after final txg was set

This allowed to debug #16714, fixed in #16782.  Without assertions
added here it is difficult to figure out what logs cause the problem,
since the assertion happens in sync thread context.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Co-authored-by: Alexander Motin <mav@FreeBSD.org>
Closes #16795
module/zfs/spa_history.c