(c)  Copyright 1989 Commodore-Amiga, Inc.   All rights reserved.
The information contained herein is subject to change without notice, and 
is provided "as is" without warranty of any kind, either expressed or implied.  
The entire risk as to the use of this information is assumed by the user.


			FAST FILING SYSTEM

                           by Steve Beats

The Fast Filing System is a new file system provided for use with any hard
disk that you can connect to your Amiga.  The only restriction is that the
hard disk driver must provide the standard set of disk device commands and
present the media in track and sector format. Since Commodore's controller,
the A2090, auto-mounts the default filesystem on the first partition of a
hard disk, it is not possible to use the Fast Filing System here. However,
using a new version of the Mount command, it's possible to make additional
partitions that utilize the Fast Filing System.

Fast Filing System is based on the original filesystem provided by AmigaDOS. 
This results in a high level of compatibility that allows application 
programs and the standard DOS commands to function under FFS without any 
changes required. That is where the similarities end.

FFS has been completely re-written in assembler and many of the algorithms 
completely revised to provide much faster response for internal processing.
FFS now spends much more time waiting for I/O or DOS packets instead of
spending all its time figuring out what to do.  For a task that runs at a
high priority on a multi-tasking machine this has obvious benefits.

Although there have been many minor re-arrangements of the disk format, the
only major incompatibilty with the old filesystem concerns the data blocks.
Under the old system, data blocks consisted of 24 bytes of header information
followed by 488 bytes of user data.  This means the old system has no option
but to read data from the drive one block at a time.  Since most hard drives
use DMA to transfer data from the disk to memory, this is an inefficient
method and does not use the hardware to its full potential.  FFS addresses 
this problem by storing nothing but data in the data blocks.  Wherever 
possible, data blocks are allocated consecutively which means large reads 
and writes can be performed in one operation.  Even though the old filesystem 
uses this allocation technique, most gains were lost because it had to make 
separate I/O requests for each block.  In addition, the old filesystem used 
cache buffers for both data and header blocks, while FFS only caches headers 
and partial data block transfers.  Large reads and writes that are multiples 
of 512 and positioned at an even address are transferred directly to or from
the user buffer.  This is possible because there is no extraneous information
to be stripped from the data.  It is worth noting that a pleasant side
effect of the new data format is a 4.9% increase in the amount of data that
can be stored on a given disk - about an extra 50K per Megabyte of storage.

The speed increases are a little difficult to quantify because FFS can read
unfragmented files as fast as the disk can transfer the data and write files
at about 75% of the maximum disk transfer rate.  This compares very favorably
with the old file system which lost percentage transfer speed as the speed
of the disk increased.  Using a Conner 100Mb SCSI drive and the Commodore
A2090 controller, FFS is 12 times faster then the old filing system on both
read and write operations utilizing a 100KB buffer.  ExNext, the DOS function
to scan a directory, is from 5 to 20 times faster, depending on how many 
cache buffers have been allocated and how many of the file headers are
in those cache buffers.  The disk validator is now resident with FFS and does
not need to be loaded off the disk as in the old filesystem.  Validation of
a regular sized hard disk (about 20 Meg) will complete about 40 times faster
and allow accesses to that disk with a performance hit of only 40% as opposed
to around 90% under the old filesystem.

To summarize,  FFS is much faster than the old filesystem in all areas. As
the disk transfer speed increases, FFS keeps up and fully utilizes the data
bandwidth of a given controller.  Compatibility with most existing software
has been maintained with the exception of programs such as DiskDoctor 
which assume the old data block format is in effect.  



				MOUNTING FFS
				============

Mounting FFS is easy.  All you need to do is prep your drive with a very small 
first partition - I usually use 2 or 3 cylinders.  Reboot the machine once 
prep is complete and then proceed through the following steps which assume 
that you are using an ST506 20 Megabyte drive with the first partition 
occupying cyclinders 2 to 3.  If you are using a different kind of drive you 
will have to adjust the drive parameters to suit.

	1. Copy FFS into L:NEWFS
	2. Make sure you have the new MOUNT command in C:
	3. Edit DEVS:MOUNTLIST and add the following entry:

FFS:	Device      = hddisk.device
	Unit        = 1
	Flags       = 0
	Surfaces    = 4
	BlocksPerTrack = 17
	Reserved    = 2
	Interleave  = 0
	LowCyl      = 4
	HighCyl     = 612
	Buffers     = 20
	Stacksize   = 1000
	GlobVec     = 1
	FileSystem  = L:NEWFS
#

	4. type 'MOUNT FFS:'
	5. type 'FORMAT DRIVE FFS: NAME "FFS IS FANTASTIC"

It's as simple as that.  Globvec and filesystem are the extra entries supported
by the new Mount command.  GlobVec=1 specifies that this is not a BCPL process
and therefore does not need to have a special BCPL environment set up when
it is first loaded.
