A From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM"  1-JUL-1993 12:50:36.47  To:	EVERHART CC:	 Subj:	RE: RMS subdirectories  , Message-Id: <9307010345.AB20504@uu3.psi.com>! Date: Wed, 30 Jun 93 23:31:27 EDT ' From: Jerry Leichter <leichter@lrw.com>  To: INFO-VAX@sri.com Subject: RE: RMS subdirectories - X-Vms-Mail-To: UUCP%"EVERHART@arisia.gce.com"   B 	The RMS code does not lend itself to any simple patch to bump theF 	number of subdirectories. The value is coded as an assembly parameterF 	FWA$C_MAXSUBDIR but also there are various buffers big enough to holdG 	each subdirectory name. This means 16 buffers of 39 chars each for the D 	current max of 7 subdirs. Evidently RMS is coded real cautiously so@ 	that IT can support the full length path specification, even if? 	nothing else should. There are many tests of these things, but C 	significantly deepening the depth of permitted trees would require G 	larger buffers or a restriction on total path length in addition. This @ 	wouldn't bother me particularly (who could type such long namesF 	anyway?) but represents some change in design for RMS. The code seemsE 	to be entirely in RMS, not in the underlying XQP, where subdirectory F 	access is handled. It ought to be possible certainly to handle deeperD 	trees in a reader program. Mind, I haven't analyzed the code in anyC 	detail; it may be that some patch could be worked up, just bashing C 	many places, but it appears that reassembly would allow this to be F 	done. Since most VMS boxes these days are larger (particularly in theE 	AXP space) I would suspect it's a good idea to bump from 8 levels to C 	something higher like maybe 32 or so. There could be a restriction B 	stated that would say that many applications could support only xD 	character pathnames and that pathnames of over, say, 255 charactersB 	were not guaranteed to work for all components, and such a system1 	would still be more useful than the current one.   K NO component of VMS can possibly handle file specifications that exceed 255 J characters since the file specification length fields in the NAM block areL bytes.  The only way to support longer specifications would be to change the$ RMS interface - a major undertaking.  J The length of the file specification isn't the issue in multiple levels ofE directories; even today, the limitation is on the total length of the J specification, not on any of the components.  Consider that a nest of onlyI 5 levels of directory, each 39 characters long; plus a file name and type J each 39 characters long; already places you at 273 characters - and that'sK without the syntactic markers like the brackets, or the device name or file L version number, all of which would have to appear in the expanded specifica- tion.   H Unfortunately, a decision about data structures made many years ago whenM memory was expensive and disks were small is now rather difficult to get away J from.  It's showing up in one entirely different context:  Phase V DECnet.D An OSI node name can itself be (much) more than 255 characters long!  G BTW, for anyone who wonders how Unix manages to get away with arbitrary J nesting depths:  The design is entirely different.  In Unix, file paths asL such exist only OUTSIDE the kernel.  When you present a path to the kernel -M in the open call, say - the kernel (routine namei, to be specific) translates J one component at a time, updating a single storage area that is sufficientL to hold one inode (essentially the equivalent of one file header).  One passF of namei starts with the current inode - a directory - and a name, andK replaces the inode by the inode named in that directory.  The initial value N for the inode at the beginning of the search is either the current directory -J which is stored as an inode, NOT as in VMS as a string - or the root inodeM (which can of course always be found).  All the kernel needs is space for one M inode per process (for its current directory), and one temporary working area N inode (since the Unix kernel is single-threaded in traditional implementationsI it doesn't have to worry about multiple processes doing namei's at once).   H An interesting side-effect of this implementation is that extracting theJ current directory as a path is a non-trivial operation:  Unix has to startL with the inode and create a path that leads to it.  This is essentially like" the VMS LIB$FID_TO_NAME operation. 							-- Jerry   