Re: [RFC][PATCH] inotify 0.10.0

Mike Waychison
2004-09-28T17:40:40Z

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John McCutchan wrote:
|
| --Why Not dnotify and Why inotify (By Robert Love)--
|

| * inotify has an event that says "the filesystem that the item you were
| watching is on was unmounted" (this is particularly cool).

| +++ linux/fs/super.c 2004-09-18 02:24:33.000000000 -0400
| @@ -36,6 +36,7 @@
| #include <linux/writeback.h> /* for the emergency remount stuff */
| #include <linux/idr.h>
| #include <asm/uaccess.h>
| +#include <linux/inotify.h>
|
|
| void get_filesystem(struct file_system_type *fs);
| @@ -204,6 +205,7 @@
|
| if (root) {
| sb->s_root = NULL;
| + inotify_super_block_umount (sb);
| shrink_dcache_parent(root);
| shrink_dcache_anon(&sb->s_anon);
| dput(root);

This doesn't seem right. generic_shutdown_super is only called when the
last instance of a super is released. If a system were to have a
filesystem mounted in two locations (for instance, by creating a new
namespace), then the umount and ignore would not get propagated when one
is unmounted.

How about an approach that somehow referenced vfsmounts (without having
a reference count proper)? That way you could queue messages in
umount_tree and do_umount..

- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBWaGHdQs4kOxk3/MRAr22AJ0SHDUiIXKRKE/TBFmTYBL5J7KD9gCbBoso
DYRg+SjnO8urCKLmDbehvkM=
=5fMW
-----END PGP SIGNATURE-----