Re: [RFC][PATCH] inotify 0.10.0

From: John McCutchan
Date: Tue Sep 28 2004 - 15:27:51 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/