FreeBSD: Clean up ASSERT/VERIFY use in module

Convert use of ASSERT() to ASSERT0(), ASSERT3U(), ASSERT3S(),
ASSERT3P(), and likewise for VERIFY().  In some cases it ended up
making more sense to change the code, such as VERIFY on nvlist
operations that I have converted to use fnvlist instead.  In one
place I changed an internal struct member from int to boolean_t to
match its use.  Some asserts that combined multiple checks with &&
in a single assert have been split to separate asserts, to make it
apparent which check fails.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11971
This commit is contained in:
Ryan Moeller
2021-04-30 19:36:10 -04:00
committed by Tony Hutter
parent 4f92fe0f5c
commit 1826068523
23 changed files with 231 additions and 236 deletions
+1 -2
View File
@@ -177,8 +177,7 @@ abd_verify_scatter(abd_t *abd)
* if an error if the ABD has been marked as a linear page.
*/
ASSERT(!abd_is_linear_page(abd));
ASSERT3U(ABD_SCATTER(abd).abd_offset, <,
zfs_abd_chunk_size);
ASSERT3U(ABD_SCATTER(abd).abd_offset, <, zfs_abd_chunk_size);
n = abd_scatter_chunkcnt(abd);
for (i = 0; i < n; i++) {
ASSERT3P(ABD_SCATTER(abd).abd_chunks[i], !=, NULL);