Re: [RFC][PATCH] inotify 0.10.0

John McCutchan
2004-09-28T21:23:21Z

On Tue, 2004-09-28 at 17:10, Ray Lee wrote:
> On Tue, 2004-09-28 at 16:26 -0400, John McCutchan wrote:
> > On Tue, 2004-09-28 at 01:45, Ray Lee 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. 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.
>
> I thought so too, as linux/limits.h claims:
>
> #define NAME_MAX 255 /* # chars in a file name */
>
> But Robert earlier said:
>
> > Technically speaking, a single filename can be as large as PATH_MAX-1.
> > The comment is just a warning, though, to explain the dreary
> > theoretical side of the world.
>
> ...where PATH_MAX is 4096.
>
> So, got me. I believe there is some minor confusion going on.

A quick test of 'echo "" > XXXX...XXX' the filename seems to be limited
to 256.

John