win 2000
David Collier-Brown
David.Collier-Brown at canada.sun.com
Wed Sep 20 18:47:11 GMT 2000
Jeremy Allison wrote:
> A "quick hack" I may add to 2.2.0 to improve the user
> response for the >99% of OS's that don't have this feature :-)
> is to reshedule a changenotify scan on a rename call
Hmmn: what set is sufficient... lest do this
one by exhaustion.
In the underlying Unix (or unix-like) filesystem,
the possible set of operations which affect
the directory (as opposed to the file) is strictly
determined by the operations defined on the inode:
a) add file
remove file
rename file
affect the contents of the directory, and therefor
the directory inode's changed time.
b) read file
write file
affect the file's inode changed time,
c) chmod file (and chacl file)
chown file
chgrp file
change number of links to file
truncate file
change setuid/setgid/sticky
affect only the inode modified time
d) change file type isn't implemented directly: it
requires destruction & re-creation, so gets subsumed
by (a), and
e) lock file
unlock file
affect none of the timestamps.
So I'll claim that create, delete and rename file
are the only operations that should trigger a
change notify on the directory, and the saved
directory change times will suffice to identify
which directories to send a notify for.
Changing the algorithm to Jeremy's "hack" might
be the necessary, sufficient and elegant solution...
--dave
--
David Collier-Brown, | Always do right. This will gratify some people
185 Ellerslie Ave., | and astonish the rest. -- Mark Twain
Willowdale, Ontario | //www.oreilly.com/catalog/samba/author.html
Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb at canada.sun.com
More information about the samba-technical
mailing list