Re: [patch] inotify for 2.6.11

Timothy R. Chavez
2005-03-04T23:43:22Z

On Fri, 04 Mar 2005 13:37:24 -0500, Robert Love <rml@novell.com> wrote:
> Below is inotify, diffed against 2.6.11.
>
> I greatly reworked much of the data structures and their interactions,
> to lay the groundwork for sanitizing the locking. I then, I hope,
> sanitized the locking. It looks right, I am happy. Comments welcome.
> I surely could of missed something. Maybe even something big.
>
> But, regardless, this release is a huge jump from the previous, fixing
> all known issues and greatly improving the locking.
>
> Best,
>
> Robert Love

Hey Robert,

Are there plans of reworking the "generic" hooking infrastructure
(fsnotify.h) to be more like the security hooking framework (+
stacking)? I think it'd be nice to be able to have a fs_notify struct
of function pointers, point at the one's I've chosen to implement, and
then register / unregister with the framework. Maybe this is an
overly complicated approach, but these don't seem like they're generic
hooks in anyway.

+ * include/linux/fs_notify.h - >generic< hooks for filesystem notification, to
+ * reduce in-source duplication from both >dnotify and inotify<.

I guess I don't fully understand that comment. Just quickly glancing
at it, all you've done is added a level of indirection and shifted the
same redundant code from the VFS to fs_notify.h -- Please correct me
if I'm wrong (not at all uncommon).

As you already know, there's work being done on the audit subsystem
that also needs notifications from the filesystem and would require
yet another set of hooks. However, where we get notified might differ
from where inotify and dnotify get notified and it seems like
fs_notify is tailored specifically for inotify (and accommodates
dnotify out of obligation) and openly implements the "generic" hooks
it requires.

Regardless, if this is the way it's going to be done. We'll expand
fs_notify.h to meet our needs as well.

Also, FYI:
I just purchased the 2nd edition of your book, looking forward to reading it.

<snip>

--
- Timothy R. Chavez