LingBo Tang wrote:> Hi all,
>
> As inotify for Linux, is there same mechanism in Solaris for ZFS?
> I think this functionality is helpful for desktop search engine.
>
> I know one engineer of Sun is working on "file event monitor",
which
> will provide some information of file events, but is not for
> search purpose because it might has problem while monitoring
> a large system.
The right way to implement a desktop search engine w/ ZFS
is an API that would let you cheaply discover all the files
modified after an arbitrary file in that filesystem.
Note that a filesystem is capable of being modified far faster
than a indexing program can process those modifications. As a
result, any notification scheme must either block further
filesystem changes (unacceptable), provide infinite storage
of pending change notification events (difficult in practice),
or provide a means for re-discovering what has changed since
the last time the changes were examined. Since the latter
mechanism is needed anyway to handle initialization or
modifications during periods when the search engine isn''t
running, making finding modified files cheap seems like the
easiest and most robust approach.
Since ZFS uses COW semantics, it is possible to provide
a means to very cheaply discover files that have been modified
since another file in the filesystem. This cost of this
discovery may be very roughly order of the number of modified files
times the average number of files in a directory times mean
modified file directory depth.
- Bart
--
Bart Smaalders Solaris Kernel Performance
barts at cyber.eng.sun.com http://blogs.sun.com/barts