[comp.sys.atari.st] file limits of root directories

gpm@dukempd.UUCP (Guy Metcalfe) (02/15/88)

	I was trying to download a fortran library to the ST over a modem using
Uniterm's kermit.  Kermit was writing the files to the root directory of the
ST's disk drive when I ran into a problem.  After writing the first 100 files
with no problem, the kermit couldn't open the next destination file.  After the
100th file the default destination extension suddenly changed from ".F" to
".KK1".  Then a message appeared proclaiming the kermit unable to open the 
file.  I changed the destination path to the root on the ram disk and 
downloaded a few more subroutines.  Copying these to the disk drive didn't work
either, failing with the same complaint.  Lack of space was not the problem as
the disk was formatted to 830k and the first 100 subroutines only took up about
150k.  
	I "solved" this problem by putting all the routines into a subdirectory
Once the subdirectory became the destination directory, kermit could open and
transfer the rest of the files--about 100 more--directly without any more flak
from the ST. 
	Question:  is there a 100 file limit on root directories?  And if so,
why doesn't it extend to the branches as well?  Did I run up against a real
snag in TOS; is this related to the "40 folder limit", which I believed to be
a problem only with hard drives?  I tried on several different occasions to
break the 100 file barrier on the root directly before I gave up.
-- 
	Guy Metcalfe                            gpm@dukempd.uucp  
	Duke University Dept. of Physics	mcnc!duke!dukempd!gpm 
	Durham, N.C.      27706			despot@tucc.bitnet   

cyliax@ea.ecn.purdue.edu (Ingo Cyliax) (02/15/88)

In article <449@dukempd.UUCP> gpm@dukempd.UUCP (Guy Metcalfe) writes:
>
>
>	Question:  is there a 100 file limit on root directories?  And if so,
>why doesn't it extend to the branches as well?  Did I run up against a real
>snag in TOS; is this related to the "40 folder limit", which I believed to be
>a problem only with hard drives?  I tried on several different occasions to
>break the 100 file barrier on the root directly before I gave up.

Yes, there is a fixed limit on files/directory entries for the root
directory, this however has nothing to do with the "40 Folder Bug".
The root directory is just a fixed area after the FAT (file allocation table),
of fixed size. The subdirectories are more like files, and can be dynamic
in size. 

The size of the root directory varies with the media and can be changed
when initializing the media, on the atari you can  use the "write
boot block xbios call" for floppies. I don't know what the default sizes
are. This is also a limitation in MS-DOS , since that's what filesystem
format TOS uses.


-- 
/*                              Ingo Cyliax                               *
 * ...!ihnp4!pur-ee!cyliax      ECN, Electrical Engineering Bldg.         *
 *   cyliax@ecn.purdue.edu      Purdue University, W. Lafayette,IN 47907  *
 *       ing@cc.purdue.edu      (317) 494-3473 / (317) 463-1747 after 5pm */

wheels@mks.UUCP (Gerry Wheeler) (02/16/88)

In article <449@dukempd.UUCP>, gpm@dukempd.UUCP (Guy Metcalfe) writes:
> 	Question:  is there a 100 file limit on root directories?  And if so,
> why doesn't it extend to the branches as well?
> -- 
> 	Guy Metcalfe                            gpm@dukempd.uucp  
> 	Duke University Dept. of Physics	mcnc!duke!dukempd!gpm 
> 	Durham, N.C.      27706			despot@tucc.bitnet   

This is a case where GEMDOS emulates MS-DOS's file system too well.  As
in MS-DOS, the root directory is different that the others (because in
MS-DOS version 1.x there were no subdirectories).  The root directory is
in a fixed location, and is a fixed length.  So, when it's full, it's
full. 
-- 
     Gerry Wheeler                           Phone: (519)884-2251
Mortice Kern Systems Inc.               UUCP: uunet!watmath!mks!wheels
   35 King St. North                             BIX: join mks
Waterloo, Ontario  N2J 2W9                  CompuServe: 73260,1043

apratt@atari.UUCP (Allan Pratt) (02/18/88)

in article <449@dukempd.UUCP>, gpm@dukempd.UUCP (Guy Metcalfe) says:

> 	Question:  is there a 100 file limit on root directories?

Yes.  There is a hard limit set at format time: the root directory size
of any GEMDOS (and MS-DOS) logical device is constant. 

Subdirectories don't have this problem because they are allocated as
files; when there's no more room, another cluster is allocated to the
end.

What *is* unfortunate is that subdirectories never shrink.  If you
create 1024 files in a subdirectory, then erase them all, you'll have
an "empty" subdirectory which takes up 32 clusters on your disk.
Removing the subdirectory (rmdir) reclaims that space.

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt

Thomas_E_Zerucha@cup.portal.com (02/18/88)

This is also a limit in MSDOS.  The root directory's size is specified in
the boot sector at format time.  Floppies normally default to 128, Hard disks
to 256, but if you edit the boot sector, you can make it any number you want
(@16 entries per 512 bytes sector).