public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John McCutchan <ttb@tentacle.dhs.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	nautilus-list@gnome.org
Subject: Re: [PATCH] inotify 0.5
Date: Sun, 18 Jul 2004 21:42:43 -0400	[thread overview]
Message-ID: <1090201363.3767.5.camel@vertex> (raw)
In-Reply-To: <Pine.LNX.4.58.0407181636240.8279@bigblue.dev.mdolabs.com>

On Sun, 2004-07-18 at 19:37, Davide Libenzi wrote:
> On Sun, 18 Jul 2004, John McCutchan wrote:
> 
> > 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)
> 
> Does such descriptor supports poll(2) (... f_op->poll())?
> 

You don't use the watcher descriptor to read the events. You use the fd
from opening up the inotify device (/dev/inotify). The inotify character
device does support the poll op.

The watcher descriptor is used for communication between the app and the
device driver. 

For example,
you perform the watch ioctl on "/tmp/" the ioctl returns '2'. Then when
reading from the char device, any event with wd == 2 is referring to the
the "/tmp/" directory.

the character device produces inotify events

struct inotify_event {
	int wd;
	int mask;
}

John

  reply	other threads:[~2004-07-19  1:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=1090201363.3767.5.camel@vertex \
    --to=ttb@tentacle.dhs.org \
    --cc=davidel@xmailserver.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