hash_notify_init is never called
Hasch at t-online.de
Fri Mar 30 20:32:17 GMT 2001
> But this would cause hash_notify_init to be called every time
> init_change_notify() is called. Now I know it should only
> be called once, but cnotify is declared at the top of the file
> as a static pointer. The compiler will put this in the BSS segment
> which is zeroed on load.
you are right, of course.
I missed that kernel notification is active (I am using Linux 2.4.2-XFS
for testing) and cnotify gets set from kernel_notify_init().
Now the problem I have with Samba is, that activating kernel change
notification subsequently turns off hash notification. This breaks
my Windows application.
The reason seems to be, that no change notification is happening
at all anymore.
This is because process_pending_change_notify_queue(time_t t) is
always called with argument t=0, except in function timeout_processing.
process_pending_change_notify_queue() calls cnotify->check_notify
which is either hash_check_notify() or kernel_check_notify().
Now when hash notification is used, and hash_check_notify()
is called, this works for an argument t=0.
For kernel notification the call to kernel_check_notify() simply
returns, no work is done.
I believe this isn't what kernel notification should do ?
More information about the samba-technical