[Coco] What would OS9 Do?

Gene Heskett gene.heskett at gmail.com
Thu Jun 3 21:55:37 EDT 2010


On Thursday 03 June 2010, Joe F wrote:
>Recently I've started to really dig into the OS9 file system and there
> seems to be a point I'm not understanding. The docs say that each file
> has a "File descriptor" sector that holds information about the file.
> fair enough. Part of the FD is the FD_SEG section which seems to be a
> table holding up to 48 entries for the purpose of adding extends to a
> file when the next sector isn't free. So of course I want to know what
> happens to a heavily fragmented file when all 48 slots are full and the
> system needs to extend the file again. I can only assume it would either
> fail with an error or simply re-copy the file to contiguous space, sort
> of on demand de-frag. Also as the system see the table filling up does it
> start extending the file with more empty sectors at the end?

Not at the present time, it will simply return an FD.SEG full error, and the 
disk should be cleaned up.  But this gives me yet another excuse to get up 
on my soap box.  The normal SAS=08 value, which controls the size of a given 
allocation, I have considered as being too small for 2 decades at least.

One can just as easily set it for SAS=FF which will make sure that 99.9% of 
a coco's files will be contiguously allocated by asking for 255 sectors at a 
time.  For hard drive users its almost a no brainer because the size of most 
drives says you will hit the FD.SEG full error first.

This does NOT permanently allocate that size of disk and cause wasted space 
because the allocation will be adjusted to the correct amount when the file 
is closed.  The next file will then start at the end of that file + 2 
sectors, one to allow the end of the previous file, and one for the new file 
descriptor that will be created.  Then the file proper will start with the 
next sector after the FD.

The only time it might bother you is when there are not 255 contiguous 
sectors available on that disk, at which point a simple dmode /d# SAS=20 
will reduce it to 32 contiguous sectors allowing a few more files to be 
written to that disk.  Heck, even with the 630 sector 35T SS format, it 
makes sense to me to set SAS=10 (or 20 even).

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
It is better to give than to lend, and it costs about the same.



More information about the Coco mailing list