File system changes notification

Most of the applications in FreeBSD currently use polling because of limitations of kevent-based file change monitoring (gamin, kde). Kevent approach has the same limitation as Linux' dnotify once had: file or directory should be opened to monitor changes, preventing file system unmounting. I propose to develop a kernel level file system changes notification mechanism for FreeBSD overcoming this limitation.

Milestones

  1. Very simple notification mechanism. Create user space utility for debugging printing all events. Pass all events to user space, attach to all vnodes on creation
  2. Create a library based on the utility. Add client sessions, distribute events to all clients. Add main operations to the library (initialization, addition notification, deletion of notification)
  3. Add cookies to VFS_KNOTE_LOCKED to make several notifications during move or rename part of single operation. Add path caching necessary to return previous path expected by rename and delete operations.
  4. Clean and test code before mid-term evaluation. Code is to be useful but with limitations.
  5. Filter events. Attach to vnodes client is interested in. Attach not only on vnode creation but also to already existing vnodes.
  6. Add access permissions checks. Add sysctl to enable access permissions check. Run benchmark to measure its overhead.
  7. Ensure source level compatibility with inotify. Interface is to be very similar from the beginning. Reuse tests from linux.
  8. Add linuxulator support. Linuxulator support is just a wrapper mapping linux' syscalls to native device ioctls.

SOC2010IlyaPutsikau (last edited 2010-05-05T13:56:59+0000 by IlyaPutsikau)