I started writing this a few days ago, and then put it aside, since Krishna has discovered stackable file systems, I'm going to post this anyways. On Thu, 17 Jun 2004, Krishna Monian wrote: What would be the best way to go about doing this? Is a kernel hook the only way? Is there anything that has already been done along these lines (quite sure it has)? Quinn will probably cringe at me suggesting this... But if this is not for wide spread deployment, what you can do is take the source for nullfs and create a new file system that will send messages to a user land program noting when whatever file system accesses you want to find. Instead of using nullfs to mirror the file system from one spot to another, you mearly use it to cover up the part of the file system you wish to monitor. Since you're in an "unfinished" part of the kernel, you will have to figure out how to do communiation to your user land daemon. Socket's are what Apple has suggested in the past to use (see WebDAVfs source for examples). You can probably pass whatever information you need to the file system via parameters in your custom args structure when calling mount(). Now, Apple does not endorse or support the idea of using layered file systems. This could stop functioning at any time, etc etc. And if you can find another solution that will work for you, you should use it. See QA: http://developer.apple.com/qa/qa2001/qa1242.html I've persoanlly written the only production layered file systems I'm aware of. And we're playing to move away from them as time moves on. When we started this, the Apple line was "we won't support it" instead of "we'd really prefer that you don't do it if you can at all avoid it". --- Marek Kozubal marek@portents.com _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.