From: jakob.goldbach@gmail.com (Jakob Goldbach)
To: linux-kernel@vger.kernel.org
Cc: eparis@redhat.com
Subject: [RESEND][RFC][PATCH] fsnotify: track all events on filesystem
Date: Tue, 13 Jul 2010 17:36:26 +0200 (CEST) [thread overview]
Message-ID: <20100713153626.EB8B140434E@localdomain.local> (raw)
(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);
next reply other threads:[~2010-07-13 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 15:36 Jakob Goldbach [this message]
2011-01-19 19:18 ` [RESEND][RFC][PATCH] fsnotify: track all events on filesystem Eric Paris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100713153626.EB8B140434E@localdomain.local \
--to=jakob.goldbach@gmail.com \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox