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 01:45, Ray Lee wrote:
> On Mon, 2004-09-27 at 16:52 -0400, Robert Love wrote:
> > > > +struct inotify_event {
> > > > + int wd;
> > > > + int mask;
> > > > + int cookie;
> > > > + char filename[INOTIFY_FILENAME_MAX];
> > > > +};
> > >
> > > yeah, that's not very nice. Better to kmalloc the pathname.
> >
> > That is the structure that we communicate with to user-space.
> >
> > We could kmalloc() filename, but it makes the user-space use a bit more
> > complicated (and right now it is trivial and wonderfully simple).
> >
> > We've been debating the pros and cons.
>
> 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. It makes
> userspace double-check whether the filename extends all the way to the
> boundary of the structure, and if so, then go back to the disk to try to
> guess what the kernel really meant to say.

I thought that filenames where limited to 256 characters? That was the
idea behind the 256 character limit.

John
-
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.103 / U:6.772 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site