Re: [PATCH] inotify: split kernel API from userspace support

From: Amy Griffis
Date: Fri Jun 02 2006 - 08:33:15 EST


Here is a more descriptive changelog message for this patch:

This patch introduces a kernel API for inotify, making it possible for
kernel modules to benefit from inotify's mechanism for watching
inodes.

To provide the kernel API, the current inotify code is split into two
parts: core functionality remains in inotify.c, and functionality
supporting userspace is moved to a new file inotify_user.c. The
inotify_device struct is split into inotify_handle (idr, watch list,
inotify operations) and inotify_device (event queue for userspace).
This patch also makes struct inotify_watch public so it can be
embedded in a caller's own watch structure.

In order to separate the find/update watch and add watch operations
for the kernel API, this patch adds a second per-inotify_device mutex
to prevent a userspace caller from adding the same watch twice.

This patch retains the original assumption that there will be more
watches per inotify_handle than watches on any given inode, and
performs the search for existing watches accordingly.

On Thu, Jun 01, 2006 at 11:07:02AM -0400, Amy Griffis wrote:
> Signed-off-by: Amy Griffis <amy.griffis@xxxxxx>
>
> ---
>
> fs/Kconfig | 24 +
> fs/Makefile | 1
> fs/inotify.c | 941 +++++++++++------------------------------------
> fs/inotify_user.c | 717 ++++++++++++++++++++++++++++++++++++
> include/linux/inotify.h | 76 ++++
> include/linux/sched.h | 2
> kernel/sysctl.c | 4
> kernel/user.c | 2
> 8 files changed, 1046 insertions(+), 721 deletions(-)
> create mode 100644 fs/inotify_user.c

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/