diff --git a/module/zfs/abd.c b/module/zfs/abd.c index 2d1be9752d..d5fafccd08 100644 --- a/module/zfs/abd.c +++ b/module/zfs/abd.c @@ -108,15 +108,14 @@ int zfs_abd_scatter_enabled = B_TRUE; void abd_verify(abd_t *abd) { +#ifdef ZFS_DEBUG ASSERT3U(abd->abd_size, >, 0); ASSERT3U(abd->abd_size, <=, SPA_MAXBLOCKSIZE); ASSERT3U(abd->abd_flags, ==, abd->abd_flags & (ABD_FLAG_LINEAR | ABD_FLAG_OWNER | ABD_FLAG_META | ABD_FLAG_MULTI_ZONE | ABD_FLAG_MULTI_CHUNK | ABD_FLAG_LINEAR_PAGE | ABD_FLAG_GANG | ABD_FLAG_GANG_FREE | ABD_FLAG_ZEROS | ABD_FLAG_ALLOCD)); -#ifdef ZFS_DEBUG IMPLY(abd->abd_parent != NULL, !(abd->abd_flags & ABD_FLAG_OWNER)); -#endif IMPLY(abd->abd_flags & ABD_FLAG_META, abd->abd_flags & ABD_FLAG_OWNER); if (abd_is_linear(abd)) { ASSERT3P(ABD_LINEAR_BUF(abd), !=, NULL); @@ -133,6 +132,7 @@ abd_verify(abd_t *abd) } else { abd_verify_scatter(abd); } +#endif } static void