* [RESEND][RFC][PATCH] fsnotify: track all events on filesystem
@ 2010-07-13 15:36 Jakob Goldbach
2011-01-19 19:18 ` Eric Paris
0 siblings, 1 reply; 2+ messages in thread
From: Jakob Goldbach @ 2010-07-13 15:36 UTC (permalink / raw)
To: linux-kernel; +Cc: eparis
(Resending, this time with fsnotify maintainer cc'ed)
This patch allows notification groups to get events on the entire filesystem,
not just on registered inodes.
I want to use it for a notification group that tracks all changes to the
filesystem in order to do faster backups.
Is this a good or bad idea?
/Jakob
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index fcc2f06..aa9e204 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -147,7 +147,9 @@ void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const
if (!(test_mask & fsnotify_mask))
return;
- if (!(test_mask & to_tell->i_fsnotify_mask))
+ if (!
+ (test_mask &
+ (to_tell->i_fsnotify_mask | to_tell->i_sb->s_fsnotify_mask)))
return;
/*
* SRCU!! the groups list is very very much read only and the path is
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 68ca1b0..102acf5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1382,6 +1382,9 @@ struct super_block {
* generic_show_options()
*/
char *s_options;
+#ifdef CONFIG_FSNOTIFY
+ __u32 s_fsnotify_mask;
+#endif
};
extern struct timespec current_fs_time(struct super_block *sb);
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [RESEND][RFC][PATCH] fsnotify: track all events on filesystem
2010-07-13 15:36 [RESEND][RFC][PATCH] fsnotify: track all events on filesystem Jakob Goldbach
@ 2011-01-19 19:18 ` Eric Paris
0 siblings, 0 replies; 2+ messages in thread
From: Eric Paris @ 2011-01-19 19:18 UTC (permalink / raw)
To: Jakob Goldbach; +Cc: linux-kernel
On Tue, 2010-07-13 at 17:36 +0200, Jakob Goldbach wrote:
> (Resending, this time with fsnotify maintainer cc'ed)
>
> This patch allows notification groups to get events on the entire filesystem,
> not just on registered inodes.
>
> I want to use it for a notification group that tracks all changes to the
> filesystem in order to do faster backups.
>
> Is this a good or bad idea?
>
> /Jakob
This mail (like many notification e-mails) was eaten by my spam filter.
I hope you've gotten an answer by now, but I'll respond 6 months late.
We allow you to do something very similar, by listening to events on
mount points. Hopefully that meets your needs.....
-Eric
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-19 19:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13 15:36 [RESEND][RFC][PATCH] fsnotify: track all events on filesystem Jakob Goldbach
2011-01-19 19:18 ` Eric Paris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox