Skip to contentSkip to conversation

supporting functions missing from inotify patch

DISCUSSION Steve French 2 participants 2 messages Jul 13, 2005

lore
Share & tools
lore
#0 lore raw

It looks like a couple of exports and a key supporting function are missing from the inotify patch that went into mainline yesterday.

I don't see an inode operation for registering inotify events in the fs (there is a file operation for dir_notify to register its events). In create_watch in fs/inotify.c I expected to see something like:

if(inode->inotify_create)

	ret = inode->inotify_create(inode, mask);

(a similar change would be needed in the INOTIFY_IGNORE path)

Without this, inotify will be broken except on local filesystems. Cluster and network filesystems (nfs, cifs etc.) won't know when they need to start calling back on remote directory change notifications if they aren't called at the time of the ioctl(INOTIFY_WATCH)

I also don't see exports for
fsnotify_access
fsnotify_modify

Without these exports, network and cluster filesystems can't notify the local system about changes.

Tracking local changes to files/directories is somewhat useful by itself on non-networked systems. But if directory and file change notification for remote/cluster filesystems is broken that limits its usefullness a lot.

#1 lore raw
Quoted 3 lines · Steve French

I don't see an inode operation for registering inotify events in the fs (there is a file operation for dir_notify to register its events). In create_watch in fs/inotify.c I expected to see something like:

Why not use the existing dir_notify method? No point in adding another.

Add inotify hooks as needed to your filesystem's dir_notify.

Quoted 6 lines

I also don't see exports for
fsnotify_access
fsnotify_modify

Without these exports, network and cluster filesystems can't notify the local system about changes.

Eh?

They are in <linux/fsnotify.h>.

Robert Love