Re: [PATCH] inotify 0.5

From: Ian Kent
Date: Mon Jul 19 2004 - 03:31:58 EST


On Sun, 18 Jul 2004, John McCutchan wrote:

> 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.
>

So the number of watches is restricted to the max number of file
handles/process?

Ian

-
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/