r20931: This changes the notify infrastructure from a polling-based to an event-driven
authorVolker Lendecke <vlendec@samba.org>
Sun, 21 Jan 2007 11:49:00 +0000 (11:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:21 +0000 (12:17 -0500)
commit9cd6a8a82792b7b6967141565d043b6337836a5d
treeb48d08f0f45d2aa39d35fbd4c9b6e518de981348
parent78387b3cd2e4eff8f09b6c498ca37b016ed9ecbc
r20931: This changes the notify infrastructure from a polling-based to an event-driven
based approach. The only remaining hook into the backend is now

void *(*notify_add)(TALLOC_CTX *mem_ctx,
    struct event_context *event_ctx,
    files_struct *fsp, uint32 *filter);

(Should we put this through the VFS, so that others can more easily plug in?)

The trick here is that the backend can pick filter bits that the main smbd
should not handle anymore. Thanks to tridge for this idea.

The backend can notify the main smbd process via

void notify_fsp(files_struct *fsp, uint32 action, char *name);

The core patch is not big, what makes this more than 1800 lines are the
individual backends that are considerably changed but can be reviewed
one by one.

Based on this I'll continue with inotify now.

Volker
12 files changed:
source/include/event.h
source/include/smb.h
source/smbd/close.c
source/smbd/notify.c
source/smbd/notify_fam.c
source/smbd/notify_hash.c
source/smbd/notify_kernel.c
source/smbd/nttrans.c
source/smbd/process.c
source/smbd/reply.c
source/smbd/service.c
source/smbd/trans2.c