VFS event hooks in Linux

Jeremy Allison jallison at cthulhu.engr.sgi.com
Tue Jun 29 18:34:18 GMT 1999


Richard Gooch wrote:

> So if somewhere deep in a directory tree a change is made, the SMB
> client will rescan the *entire* tree?

Actually, the server is supposed to send a list of what changed
to the client. This is hard for Samba, so we cheat by returning
a special error that means "so much changed, I can't tell you
about all of it - please re-scan yourself".

> > ChangeNotify can act just on one directory, or on a complete tree
> > (realistically it is only used on a per-directory basis).
> 
> Why do you say that? Used by whom? The client or the server?

Requested by the client.

> > This is good news, as currently Samba has to scan
> > each watched directory to notice changes (which it does
> > via a configurable, currently 60 second, timeout).
> 
> So it always scans every directory in the exported volume?!?

Nope. Only those directories the clients have issued a 
ChangeNotify call upon.

> Do the ChangeNotify events apply to directory writes only
> (i.e. writing to a regular file is ignored)?

No - in typical MS fashion there are about 10 different
things a client can request a watch-on-change upon. Realistically
the clients only really care about new files/attribute
changes/old file writes.

Regards,

	Jeremy Allison,
	Samba Team.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba-technical mailing list