public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] inotify 0.5
@ 2004-07-18 19:49 John McCutchan
  2004-07-18 19:53 ` Martin Schlemmer
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: John McCutchan @ 2004-07-18 19:49 UTC (permalink / raw)
  To: linux-kernel, nautilus-list

[-- 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 --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-07-20  3:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-18 19:49 [PATCH] inotify 0.5 John McCutchan
2004-07-18 19:53 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox