Samba 3.0.32 - internal change notify "legacy" mechanism

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Dec 9 22:15:42 GMT 2008


On Mon, Dec 08, 2008 at 06:31:20PM +0200, Shlomi Yaakobovich wrote:
> Thanks for the answer. I looked at the vfs_notify_fam.c code, it was
> quite helpful. If I get your idea correctly, you propose I create a new
> VFS module (e.g. vfs_notify), implement only the SMB_VFS_OP_NOTIFY_WATCH
> operation (and not all the FAM related code I can find in the original
> module). This OP receives all the required data for change notify
> mechanism (e.g. path of the directory, fsp as private_data). Create a
> local list of watchers. The watch will use the talloc_set_destructor in
> a similar way like fam_notify does, to remove the watched entry from the
> list.
> 
> Additionally, create some local function in this module, and use
> event_add_timed to schedule it (over and over, as long as the watch is
> required). Set this timer when the watch is created I presume. Then
> implement older logic of notify mechanism in this function (i.e. stat of
> directory, readdir, etc.). Possibly even take the older code as is to
> avoid complications... If found that NOTIFY is required, call the
> callback that was provided with the watch request. 
> 
> Let me know if I got this right.

Yep, that pretty much covers it. Please send the module to
samba-technical at samba.org once you've done it for upstream
inclusion!

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20081209/0f02d6db/attachment.bin


More information about the samba-technical mailing list