diff options
author | Eric Paris <eparis@redhat.com> | 2009-05-21 17:01:43 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2009-06-11 14:57:53 -0400 |
commit | 62ffe5dfba056f7ba81d710fee9f28c58a42fdd6 (patch) | |
tree | ac0d4afc641bdc8ff76779545fde9c6ae539bdaf /include/linux/fsnotify_backend.h | |
parent | a2d8bc6cb4a3024661baf877242f123787d0c054 (diff) |
fsnotify: include pathnames with entries when possible
When inotify wants to send events to a directory about a child it includes
the name of the original file. This patch collects that filename and makes
it available for notification.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r-- | include/linux/fsnotify_backend.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 15f8f82a5c57..52692f405890 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -192,6 +192,9 @@ struct fsnotify_event { | |||
192 | int data_type; /* which of the above union we have */ | 192 | int data_type; /* which of the above union we have */ |
193 | atomic_t refcnt; /* how many groups still are using/need to send this event */ | 193 | atomic_t refcnt; /* how many groups still are using/need to send this event */ |
194 | __u32 mask; /* the type of access, bitwise OR for FS_* event types */ | 194 | __u32 mask; /* the type of access, bitwise OR for FS_* event types */ |
195 | |||
196 | char *file_name; | ||
197 | size_t name_len; | ||
195 | }; | 198 | }; |
196 | 199 | ||
197 | /* | 200 | /* |
@@ -224,7 +227,7 @@ struct fsnotify_mark_entry { | |||
224 | /* called from the vfs helpers */ | 227 | /* called from the vfs helpers */ |
225 | 228 | ||
226 | /* main fsnotify call to send events */ | 229 | /* main fsnotify call to send events */ |
227 | extern void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is); | 230 | extern void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const char *name); |
228 | extern void __fsnotify_parent(struct dentry *dentry, __u32 mask); | 231 | extern void __fsnotify_parent(struct dentry *dentry, __u32 mask); |
229 | extern void __fsnotify_inode_delete(struct inode *inode); | 232 | extern void __fsnotify_inode_delete(struct inode *inode); |
230 | 233 | ||
@@ -319,10 +322,12 @@ extern void fsnotify_put_mark(struct fsnotify_mark_entry *entry); | |||
319 | 322 | ||
320 | /* put here because inotify does some weird stuff when destroying watches */ | 323 | /* put here because inotify does some weird stuff when destroying watches */ |
321 | extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, | 324 | extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, |
322 | void *data, int data_is); | 325 | void *data, int data_is, const char *name); |
326 | |||
323 | #else | 327 | #else |
324 | 328 | ||
325 | static inline void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is) | 329 | static inline void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, |
330 | const char *name); | ||
326 | {} | 331 | {} |
327 | 332 | ||
328 | static inline void __fsnotify_parent(struct dentry *dentry, __u32 mask) | 333 | static inline void __fsnotify_parent(struct dentry *dentry, __u32 mask) |