lkml.org 
[lkml]   [2004]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH] inotify 0.10.0
From
Date
On Tue, 2004-09-28 at 16:40 -0400, John McCutchan wrote:
> On Tue, 2004-09-28 at 15:08, Andrew Morton wrote:
> > Ray Lee <ray-lk@madrabbit.org> wrote:
> > >
> > > The current way pads out the structure unnecessarily, and still doesn't
> > > handle the really long filenames, by your admission. It incurs extra
> > > syscalls, as few filenames are really 256 characters in length.
> >
> > Why don't you pass a file descriptor into the syscall instead of a pathname?
> > You can then take a ref on the inode and userspace can close the file.
> > That gets you permission checking for free.
> >
>
> I don't think moving inotify to a syscall based interface is worth it.
>
> First off, on startup, this would require about 2k open() calls,
> followed by 2k syscalls to inotify.

And then 2k close() calls.

> Not as nice as just 2k ioctl() calls.

<shrug> Syscalls aren't free, but they aren't the end of the world.

> The character device interface right now suits it perfectly. If we used
> syscalls we would need to provide a syscall that gives user space a FD
> that it can read events on,

Again, apologies, I should know better than to write email on short
sleep. All I was suggesting was that we pass in an fd that comes from
open(), and that we should look at replacing the ioctl with write(). I
like it as a character device, honest.

Ray

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

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.122 / U:0.744 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site