From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <51866f86da16fb592ccf52a3223ef4de@collyer.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] some shell scripts Date: Thu, 14 Oct 2004 17:25:45 -0700 From: geoff@collyer.net In-Reply-To: <416E9B72.9030400@9fs.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: ee72e556-eacd-11e9-9e20-41e7f4b1d025 One could start lnfs early in cpurc and termrc, have it post a /srv file, and have /lib/namespace* mount that /srv file. I think that for the sort of thing you described (with Beagle), creations and removals are of primary interest, though one could watch for writes too. Keeping a database or log of such changes (perhaps served from the watcher file server, permitting some in-memory caching) is vastly cheaper than statting a potentially huge set of files every second (though the difference would be even bigger on (l)unix, with the directory entries separated from the i-nodes). One should be able to just note the new file name, size and perhaps mtime of each write, so the volume of data should be tolerable. If you're building indices, a watcher client would probably want to wait for a given file to be closed and perhaps wait a little longer in case it's rewritten, then index it. Maybe index every changed file each hour, or something of the sort. I don't think the need kernel mods for this.