From: John McCutchan <ttb@tentacle.dhs.org>
To: linux-kernel@vger.kernel.org, nautilus-list@gnome.org
Subject: [PATCH] inotify 0.5
Date: Sun, 18 Jul 2004 15:49:27 -0400 [thread overview]
Message-ID: <1090180167.5079.21.camel@vertex> (raw)
[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]
Inotify is a replacement for dnotify.
The main difference between this and my earlier inotify design, is that
device numbers and inode numbers are no longer used. The interface
between user and kernel space uses a watcher descriptor.
inotify is a char device with two ioctls
WATCH
which takes
struct inotify_watch_request {
char *dirname; // directory name
unsigned long mask; // event mask
};
and returns a watcher descriptor (int)
IGNORE
which takes a watcher descriptor and returns nothing.
After you WATCH a directory, and events that happen on the inode for the
directory that match the mask you asked for will be available to read
from the char device. You read this structure from the character device.
struct inotify_event {
int wd;
int mask;
};
When a directory you are watching is unmounted, you will get a UNMOUNT
event.
When a directory is unmounted or you use the IGNORE ioctl on the char
dev. You will get a IGNORED event.
I have attached a tarball, which includes the patch for linux 2.6.7 and
a small test app.
I have tested this on my system and AFAIK it is working. No doubt it has
plenty of bugs.
I plan on adding an inotify backend to gamin soon.
John
[-- Attachment #2: inotify-0.5.tar.gz --]
[-- Type: application/x-compressed-tar, Size: 9296 bytes --]
next reply other threads:[~2004-07-18 19:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-18 19:49 John McCutchan [this message]
2004-07-18 19:53 ` [PATCH] inotify 0.5 Martin Schlemmer
2004-07-18 20:02 ` John McCutchan
2004-07-18 20:11 ` Martin Schlemmer
2004-07-18 20:22 ` John McCutchan
2004-07-18 23:37 ` Davide Libenzi
2004-07-19 1:42 ` John McCutchan
2004-07-19 8:43 ` Ian Kent
2004-07-19 13:33 ` Chris Friesen
2004-07-19 21:31 ` John McCutchan
2004-07-20 2:59 ` Eric Lammerts
2004-07-20 3:24 ` John McCutchan
2004-07-20 1:33 ` Ian Kent
2004-07-19 3:37 ` Daniel Veillard
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=1090180167.5079.21.camel@vertex \
--to=ttb@tentacle.dhs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nautilus-list@gnome.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