ZFS_DEBUG + enable ZFS ASSERTS with INVARIANTS any objections?
Matthew Ahrens
mahrens at delphix.com
Tue Jul 2 06:51:13 UTC 2013
If I understand correctly, INVARIANTS is a mechanism that enables
additional runtime checks in the kernel, analogous to DEBUG enabling
ASSERTions in Solaris-derived code. You want to turn on ZFS_DEBUG and
assertions within ZFS without setting DEBUG in general.
Why do you want to do this? Why not set DEBUG and turn on all assertions
in Solaris-derived code? If it is performance, how much slow down do
non-ZFS assertions cause? If it's too much, can we fix that?
I'm not sure why ZFS_DEBUG exists, rather than just using DEBUG. It may be
historical; now it seems that ZFS_DEBUG and DEBUG are always set together
(including in libzpool). Unless there's a good reason for them to be
separate, I'd rather see ZFS_DEBUG removed, and use DEBUG instead.
--matt
On Sat, Jun 29, 2013 at 4:47 PM, Steven Hartland <smh at freebsd.org> wrote:
> The attached patch adds a ZFS_DEBUG option as well
> as enabling ZFS ASSERTS by default when the kernel
> is compiled with INVARIANTS.
>
> This should enable us to get better test coverage
> from CURRENT users and has already enabled me to
> catch a number of issues when testing code + fix
> for invalid ASSERT removed by r252390.
>
> So the question is there any objections to this
> patch?
>
> Regards
> Steve
> _______________________________________________
> zfs-devel at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/zfs-devel
> To unsubscribe, send any mail to "zfs-devel-unsubscribe at freebsd.org"
>
More information about the zfs-devel
mailing list