Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Dec 2014 00:48:26 +0800
From:      Julian Elischer <julian@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-current@freebsd.org, FreeBSD Current <current@freebsd.org>
Subject:   Re: witness and modules.
Message-ID:  <547DED5A.4050307@freebsd.org>
In-Reply-To: <F9C776BA-EAF7-4A38-8AEE-3501C41F40D6@bsdimp.com>
References:  <54788FF3.3030602@freebsd.org> <2805430.yZtslRjaC7@ralph.baldwin.cx> <547D4947.4040203@freebsd.org> <F9C776BA-EAF7-4A38-8AEE-3501C41F40D6@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/3/14, 12:24 AM, Warner Losh wrote:
>> On Dec 1, 2014, at 10:08 PM, Julian Elischer <julian@freebsd.org> wrote:
>>
>> On 12/1/14, 11:39 PM, John Baldwin wrote:
>>> On Friday, November 28, 2014 11:08:35 PM Julian Elischer wrote:
>>>> Do we need to compile all modules with witness definitions when
>>>> linking with a kernel compiled with witness?
>>>> This was true at one stage but I remember some work was done to make
>>>> them compatible.
>>> You should not need this.  modules always call functions in the kernel for
>>> lock operations and this functions are what invoke WITNESS.
>>>
>> that's what I thought but empirical evidence disagrees.
>> I'll try some more cases.
> I swap back and forth all the time between the two. Kernel modules don’t
> change when you compile them with WITNESS or without.
>
> Warner
>
it's a 10.0 based system.

the zfs kernel module grew a reference to witness_restore and 
witness_save  when it was compiled with witness in opt_global.h.
I certainly wouldn't load with a standard kernel. it may have been 
somethign funny with the zfs compat layer stuff, and I'm pretty sure 
people don't use zfs as a module much, but it was definitely there. 
note: it'd probably work the other way around.. a non-witness module 
would probably load on a witness kernel.. none of the other kernel 
modules had that extra reference so I think it's specific to zfs.   
Maybe to the way it was compiled.. the sources are pretty standard but 
the makefiles are a bit hacked..






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?547DED5A.4050307>