[<prev] [next>] [day] [month] [year] [list]
Message-ID: <AANLkTilC2abOtOfvQ-dYaLn57Vhu_PTqGFfI5pzeYnw4@mail.gmail.com>
Date: Fri, 2 Jul 2010 15:00:17 +0200
From: Jakob Goldbach <jakob.goldbach@...il.com>
To: linux-kernel@...r.kernel.org
Subject: [RFC] fsnotify: track events on entire fs
This patch allows notifications groups to get events on entire fs 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 idea ?
Thanks,
Jakob
---
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index fcc2f06..58158cf 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -147,7 +147,7 @@ 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 471e1ff..cd65f7a 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists