Date: Tue, 4 Feb 2003 17:52:35 -0500 (EST) From: Robert Watson <rwatson@freebsd.org> To: phk@freebsd.org Cc: arch@freebsd.org Subject: Re: length of device names. Message-ID: <Pine.NEB.3.96L.1030204175153.20508o-100000@fledge.watson.org> In-Reply-To: <19572.1044358190@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
Sounds reasonable to me. I just wanted longer device names, I didn't want unlimited ones. :-) Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories On Tue, 4 Feb 2003 phk@freebsd.org wrote: > > There are some irritating implications of making device names truly > variable size, and I am not yet comfortable making the semantic > changes it causes, people calle makedev() and make_dev() from the > damnest places. > > In fact, I am not even convinced doing the work would have a positive > payoff in the end compared to sticking with KISS and just taking > the memory hit for a longer default buffer. > > I decided to increase the limit to 63 characters for now, and revisit > the issue if this limit ever becomes a problem. I personally expect > and hope that any device name approaching than 63 characters would > hit against other (esthetical) boundaries first. > > We currently allocate 50 dev_t's at compile time (to be able to > make it until malloc(9) works) and the rest with malloc(9). The > current size of a dev_t is 140 bytes + space for the name, so in > theory we can allow for 116 bytes long names at a net cost of only > 50 times the increase since malloc(9) already allocates us 256 bytes > buckets, so the net cost of this change was 2400 bytes. > > Summary: I'm shelving the unlimited name length for now, hoping that > 63 or subsequently 116 will be enough to cater for our needs. > > Poul-Henning > > > In message <200302041107.h14B7ST1060100@repoman.freebsd.org>, Poul-Henning Kamp > writes: > >phk 2003/02/04 03:07:28 PST > > > > Modified files: > > sys/sys param.h > > Log: > > Increase the allowed length of device names to 63 characters. > > > > This is a band-aid while I fret over how much breakage removing the > > restriction entirely will result in. > > > > Please note that this is still a limit for the entire pathname > > relative to the mountpoint of devfs, so the length of "/dev/fd/3" > > is 4 characters. > > > > Revision Changes Path > > 1.142 +1 -1 src/sys/sys/param.h > > > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030204175153.20508o-100000>