ZFS_DEBUG + enable ZFS ASSERTS with INVARIANTS any objections?
Will Andrews
will at firepipe.net
Mon Jul 1 15:48:36 UTC 2013
On Mon, Jul 1, 2013 at 6:04 AM, Steven Hartland <killing at multiplay.co.uk> wrote:
> I'm not sure we want DEBUG enabled in modules triggered by INVARIANTS
> as this does add quite a bit more than just additional ASSERT checks,
> which as mentioned above is what the patch is designed to achieve.
>
> My reason for keeping it just to ASSERTs / VERIFYs was to gain the
> main benefit without enabling significant extra code.
>
> Perhaps adding an additional global flag such as OPENSOLARIS_DEBUG
> in addition to enabling ASSERT checks is the way to go?
I personally really don't think it will be worthwhile. INVARIANTS is
already a very expensive option to enable, and it is enabled by people
who are trying to validate their kernel. In any case, we seriously
need more people running *all* of the extra checking available in ZFS,
assuming they are actually using ZFS on an INVARIANTS kernel.
In SpectraBSD, we have a local patch that allows enabling ZFS_DEBUG
via the kernel config, although the mechanism used is more of a hack
(so I would not want it in FreeBSD :-)). But using a proper global
option, if one wants to turn on ZFS_DEBUG specifically, would be nice.
I think we should do that in addition to making INVARIANTS imply
ZFS_DEBUG.
Long term, FreeBSD will derive significant value from being able to
easily merge changes from other ZFS ports. Therefore, it should be a
high priority to either avoid making changes that can't reasonably be
merged upstream, or to define an interface that can be merged upstream
as a stub and implemented locally.
--Will.
More information about the zfs-devel
mailing list