Mount name length limit (MNAMELEN)

Matt Emmerton matt at gsicomp.on.ca
Thu Aug 5 07:58:22 PDT 2004




> On Wednesday 04 August 2004 17:40, Patrick Dung wrote:
> > Hi
> >
> > It seems that the constant is in /usr/sys/sys/mount.h.
> > The limit is already there since the initial import in
> > 1995. (From 4.4BSD?)
> > I want to know what is the root cause preventing a
> > larger value.
> >
> > PS: I have found some interesting links about
> > MNAMELEN:
> >
> > http://leaf.dragonflybsd.org/mailarchive/kernel/2003-08/msg00194.html
> >
> > http://www.secnetix.de/~olli/FreeBSD/mnamelen.hawk

I recall bringing this up on the FreeBSD lists a while ago (1-2 years?) and
IIRC, the reason this is tough to change is that we use this constant in a
lot of internal structures, and changing the constant will change the
structure sizes which will break a lot of things.

>From what I've seen in the Linux code, they never store a "char
blah[MNAMELEN]" in their structures, but rather, a pointer to that data
element (in the name cache, I think).  Thus, they are free to change the
size of the element without affecting the majority of structures that use
it.

--
Matt Emmerton



More information about the freebsd-hackers mailing list