Amiga Fast File System
Encyclopedia
The Amiga Fast File System (FFS; not to be confused with the identically named Berkeley Unix FFS) is a file system
used on the Amiga
personal computer
. The previous Amiga filesystem (known originally simply as "DOS" or AmigaDOS) upon the release of FFS became known as Amiga Old File System
(OFS). OFS, while fine on floppy disk, soon proved too slow to keep up with era hard drives. FFS was designed as a full replacement for the original Amiga filesystem.
FFS differs from its predecessor mainly in the removal of redundant information. Data blocks contain nothing but data, allowing the filesystem to manage the transfer of large chunks of data directly from the host adapter
to the final destination.
FFS was rapidly adopted as the filesystem used by almost all Amiga users, although OFS continued to be widely used on floppy disks by software vendors. This was purely for compatibility with pre-AmigaOS 2 systems in games and applications that did not actually require AmigaOS 2+, as machines running earlier versions of the OS without FFS in the ROM could not boot from these floppies. Many, if not most, Amiga games of the time required booting directly from the game disks.
FFS is simple and efficient, and when introduced was more than adequate, and had many advantages compared to the file systems of other platforms. However, as OFS had done before it, it aged; as drives became larger and the number of files on them increased, its use became increasingly problematic. Despite this, it is still used on Amiga systems even today.
By the last Commodore release of AmigaOS, 3.1, FFS was still the only filesystem shipped as standard with the Amiga, but was already showing its age. Peculiarly, FFS (and OFS) stores a "bitmap" of the filesystem in a single sector, which is prone to corruption or deletion if a write operation is interrupted by a crash or disk removal. This could result in a situation known as filesystem invalidation. To reverse this, the entire disk had to be completely scanned and the bitmap rebuilt.
AmigaOS included a disk validator, originally on disk (which was unfortunately prone to being replaced by viruses to allow themselves to spread) or, more sensibly, as part of the ROM (from Kickstart 2.x onwards). The disk validator attempted to repair the bitmap by write-protecting the drive and scanning it; this could take a long time and made it very slow to access the disk until it was finished, especially on slower media. As hard drives got larger and contained more files, the validation process could take many hours. In addition, files and directories were prone to being lost (often without user notification) during the process if their data hashes were corrupted. In some cases the validator could even fail, forcing the user to use a third-party disk tool like DiskSalv to make the volume writable again – and DiskSalv could only be used on drives smaller than 4 GB.
Although originally limited to 32-bit addressing (and therefore about 4 GB drives), FFS belatedly got some third-party 64-bit patches and then real (but non-Commodore) updates to allow it to circumvent these limitations.
In terms of support tools, although Commodore itself only shipped the much-despised DiskDoctor (and later removed it from AmigaOS disks), FFS had a small selection of third-party tools like DiskSalv to maintain the file system and repair and validate it, undelete files, or reverse "quick formats" (filesystem initializations). An OFS or FFS volume had to be locked to defragment or convert to different FFS modes to prevent corruption – this made it inaccessible to everything but the tool defragmenting it. Most of these tools were not updated by the time FFS became capable of 64-bit addressing and could only operate on drives smaller than 4 GB of the drive; they could not read partitions bigger than 4 GB, and would generally corrupt partitions "beyond" the 4 GB boundary. When hard drives were reaching 4 GB in size, this obviously became a real problem.
For these reasons, FFS was already being replaced by users by the mid-1990s with more up to date alternatives such as Smart File System
(SFS) and Professional File System
(PFS), which did not have these limitations and were also safer, faster and more efficient. SFS in particular kept being developed and is so popular as to be anecdotally considered the default file system of both AmigaOS 4 and MorphOS
.
in 1988. It carried the version number of v34, like the rest of the OS.
FFS was backwards compatible with the older filesystem (which became known as OFS), but Amiga machines with older versions of the Kickstart ROM could not boot from FFS-formatted floppy disks. In the case of hard drives, the FFS filesystem could be placed onto the drive RDB
(Rigid Disk Block) and executed on boot; it could also be kept on disk for mounting other FFS volumes. Apart from this inability of older systems with FFS in ROM to boot, FFS did not have any compatibility problems with Amiga software, even ones that were considered "system-unfriendly".
FFS operated in several modes, defined by "dostypes". AmigaOS filesystems are identified by a four letter descriptor which is specified either in the RDB or a mountlist or dosdriver; alternatively (as was the case in trackdisk-like devices like floppy disks), the disk itself could be formatted in any dostype specified.
FFS dostypes were as follows:
DOS\0: The original Amiga filesystem (OFS). This was left in for compatibility purposes, and the majority floppy disks shipped by software companies or as magazine coverdisks used this dostype so that they would boot on pre-2.x machines like the Amiga 500. It also meant that users with existing OFS-formatted drives could read them once they had installed FFS to the RDB.
DOS\1: The new filesystem, FFS. The first, disk-based releases of FFS did not have any additional modes.
AmigaOS 2.04 made FFS (now v37) part of the Kickstart ROM and introduced new modes for handling international characters in filenames, and for an on-disk directory cache. Each new mode was available with both OFS and FFS dostypes. This odd system was for parity: OFS modes apart from DOS\0 were almost never used but were available nonetheless. (It should be noted that, alhough OFS, they were still not compatible with Amiga systems without FFS).
The four new dostypes introduced with v37 of FFS:
DOS\2: "International" (OFS-INTL) mode allows OFS to handle filenames with "international characters" - i.e. those not found in English, such as ä and ê.
DOS\3: International mode, for FFS (FFS-INTL). This was the most commonly used FFS mode. (All higher dostypes have international mode always enabled.)
DOS\4: "Directory Cache" (OFS-DC) mode enabled to primitive cache by creating dedicated directory lists instead of having to pick up the linked directory/file entries that lie scattered over the disk. A certain (small) amount of disk space to store the data is allocated. The DirCache option improved directory reading speed drastically but creating, deleting and renaming files became slower. It did not increase the speed of reading individual files.
It became a popular choice on Amiga hard drives, but according to Olaf Barthel, author of FFS2, the use of dircache modes was probably better for floppy disks than it was for hard drives, where it would cause an overall degradation in performance compared to lack of dircache. Despite this it was rarely used on floppy, particularly because of the cache eating precious space, and because of the limited space preventing there being many files to cache in the first place. (According to Barthel it may also have had some serious implementation bugs that would compromise the filesystem over prolonged usage, although the specifics were never released.)
DOS\5: Directory caching with FFS (FFS-DC). Both dircache modes were not backwards compatible with earlier versions of FFS.
Version 40.1 was the last version of FFS released by Commodore, and came with AmigaOS 3.1, both on the OS disks and in the ROM. After this, several unofficial patches appeared which allowed its use on drives after the first 2 GB of a hard disk using a 64-bit addressing system called TrackDisk64 or TD64 (although the 2 GB limit on file size and the 127 GB limit on partition sizes remained, as it was a limitation of AmigaOS dos.library and all then-current Amiga software) and carried the version number of v44. The version of FFS that came with AmigaOS 3.5 and 3.9 was v45 and differed in that it used a different 64-bit addressing system, New Style Device or NSD.
More recently (from 2003), MorphOS
and AmigaOS 4 have introduced support for a slightly updated "FFS2", by Olaf Barthel (FFS v46, v50 respectively). This is compatible with the older FFS. It is PowerPC
native, and introduced two more dostypes (which are not capable of being read by the older FFS):
DOS\6: "Long Filename" (OFS-LNFS). This allowed files to have a longer filename (up to 107 characters) than the usual Amiga limit, which was 30 characters.
DOS\7: Long filenames for FFS (FFS-LNFS).
There were no directory caching modes available for LNFS dostypes, and International Mode was always enabled.
Despite the ability to use the long filenames, by this time FFS compared very poorly to other available filesystems on the platforms it was available for. Apart from these extra dostypes, there are little or no functional difference between FFS and FFS2 (although some older non-specified bugs may have been dealt with) and should still not be used except for legacy purposes. Disk validation is still necessary in FFS2 (and may still result in data loss) just as it was on FFS, despite early beliefs to the contrary.
On the Amiga, the freeware application xfs could, among many filesystems, read and write to devices formatted in OFS or FFS, and was probably the sole Amiga filesystem apart from FFS/FFS2 itself to do so. It did not support DOS\6 or DOS\7, or formatting of devices.
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...
used on the Amiga
Amiga
The Amiga is a family of personal computers that was sold by Commodore in the 1980s and 1990s. The first model was launched in 1985 as a high-end home computer and became popular for its graphical, audio and multi-tasking abilities...
personal computer
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...
. The previous Amiga filesystem (known originally simply as "DOS" or AmigaDOS) upon the release of FFS became known as Amiga Old File System
Amiga Old File System
On the Amiga, the Old File System was the filesystem for Amiga OS before the Amiga Fast File System. Even though it used 512-byte blocks, it reserved the first small portion of each block for metadata, leaving an actual data block capacity of 488 bytes per block...
(OFS). OFS, while fine on floppy disk, soon proved too slow to keep up with era hard drives. FFS was designed as a full replacement for the original Amiga filesystem.
FFS differs from its predecessor mainly in the removal of redundant information. Data blocks contain nothing but data, allowing the filesystem to manage the transfer of large chunks of data directly from the host adapter
Host adapter
In computer hardware, a host controller, host adapter, or host bus adapter connects a host system to other network and storage devices...
to the final destination.
Characteristics
OFS, the predecessor to FFS, used 24 bytes per sector for redundancy data, providing for reconstructing structural data on less reliable media. When higher speed media (i.e. hard disks) became more available to the Amiga, this redundant data posed a bottleneck as all data needed to be realigned to be passed to the application. So the redundancy was removed for FFS and the data read in from media could be passed to the application directly.FFS was rapidly adopted as the filesystem used by almost all Amiga users, although OFS continued to be widely used on floppy disks by software vendors. This was purely for compatibility with pre-AmigaOS 2 systems in games and applications that did not actually require AmigaOS 2+, as machines running earlier versions of the OS without FFS in the ROM could not boot from these floppies. Many, if not most, Amiga games of the time required booting directly from the game disks.
FFS is simple and efficient, and when introduced was more than adequate, and had many advantages compared to the file systems of other platforms. However, as OFS had done before it, it aged; as drives became larger and the number of files on them increased, its use became increasingly problematic. Despite this, it is still used on Amiga systems even today.
By the last Commodore release of AmigaOS, 3.1, FFS was still the only filesystem shipped as standard with the Amiga, but was already showing its age. Peculiarly, FFS (and OFS) stores a "bitmap" of the filesystem in a single sector, which is prone to corruption or deletion if a write operation is interrupted by a crash or disk removal. This could result in a situation known as filesystem invalidation. To reverse this, the entire disk had to be completely scanned and the bitmap rebuilt.
AmigaOS included a disk validator, originally on disk (which was unfortunately prone to being replaced by viruses to allow themselves to spread) or, more sensibly, as part of the ROM (from Kickstart 2.x onwards). The disk validator attempted to repair the bitmap by write-protecting the drive and scanning it; this could take a long time and made it very slow to access the disk until it was finished, especially on slower media. As hard drives got larger and contained more files, the validation process could take many hours. In addition, files and directories were prone to being lost (often without user notification) during the process if their data hashes were corrupted. In some cases the validator could even fail, forcing the user to use a third-party disk tool like DiskSalv to make the volume writable again – and DiskSalv could only be used on drives smaller than 4 GB.
Although originally limited to 32-bit addressing (and therefore about 4 GB drives), FFS belatedly got some third-party 64-bit patches and then real (but non-Commodore) updates to allow it to circumvent these limitations.
In terms of support tools, although Commodore itself only shipped the much-despised DiskDoctor (and later removed it from AmigaOS disks), FFS had a small selection of third-party tools like DiskSalv to maintain the file system and repair and validate it, undelete files, or reverse "quick formats" (filesystem initializations). An OFS or FFS volume had to be locked to defragment or convert to different FFS modes to prevent corruption – this made it inaccessible to everything but the tool defragmenting it. Most of these tools were not updated by the time FFS became capable of 64-bit addressing and could only operate on drives smaller than 4 GB of the drive; they could not read partitions bigger than 4 GB, and would generally corrupt partitions "beyond" the 4 GB boundary. When hard drives were reaching 4 GB in size, this obviously became a real problem.
For these reasons, FFS was already being replaced by users by the mid-1990s with more up to date alternatives such as Smart File System
Smart File System
The Smart File System is a journaling filesystem used on Amiga computers. It is designed for performance, scalability and integrity...
(SFS) and Professional File System
Professional File System
The Professional File System is a filesystem originally developed commercially for the Amiga, it is now distributed on Aminet with a 4-clause BSD license. PFS tends to perform very well, due to the simplicity of design. Compatible successor of Ami-FileSafe....
(PFS), which did not have these limitations and were also safer, faster and more efficient. SFS in particular kept being developed and is so popular as to be anecdotally considered the default file system of both AmigaOS 4 and MorphOS
MorphOS
MorphOS is an Amiga-compatible computer operating system. It is a mixed proprietary and open source OS produced for the Pegasos PowerPC processor based computer, PowerUP accelerator equipped Amiga computers, and a series of Freescale development boards that use the Genesi firmware, including the...
.
History
FFS was introduced with version 1.3 of AmigaOSAmigaOS
AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000...
in 1988. It carried the version number of v34, like the rest of the OS.
FFS was backwards compatible with the older filesystem (which became known as OFS), but Amiga machines with older versions of the Kickstart ROM could not boot from FFS-formatted floppy disks. In the case of hard drives, the FFS filesystem could be placed onto the drive RDB
Amiga Rigid Disk Block
In computing, a rigid disk block is the block on a hard disk where the Amiga series of computers store the disk's partition and filesystem information. The PC equivalent of the Amiga's RDB is the master boot record ....
(Rigid Disk Block) and executed on boot; it could also be kept on disk for mounting other FFS volumes. Apart from this inability of older systems with FFS in ROM to boot, FFS did not have any compatibility problems with Amiga software, even ones that were considered "system-unfriendly".
FFS operated in several modes, defined by "dostypes". AmigaOS filesystems are identified by a four letter descriptor which is specified either in the RDB or a mountlist or dosdriver; alternatively (as was the case in trackdisk-like devices like floppy disks), the disk itself could be formatted in any dostype specified.
FFS dostypes were as follows:
DOS\0: The original Amiga filesystem (OFS). This was left in for compatibility purposes, and the majority floppy disks shipped by software companies or as magazine coverdisks used this dostype so that they would boot on pre-2.x machines like the Amiga 500. It also meant that users with existing OFS-formatted drives could read them once they had installed FFS to the RDB.
DOS\1: The new filesystem, FFS. The first, disk-based releases of FFS did not have any additional modes.
AmigaOS 2.04 made FFS (now v37) part of the Kickstart ROM and introduced new modes for handling international characters in filenames, and for an on-disk directory cache. Each new mode was available with both OFS and FFS dostypes. This odd system was for parity: OFS modes apart from DOS\0 were almost never used but were available nonetheless. (It should be noted that, alhough OFS, they were still not compatible with Amiga systems without FFS).
The four new dostypes introduced with v37 of FFS:
DOS\2: "International" (OFS-INTL) mode allows OFS to handle filenames with "international characters" - i.e. those not found in English, such as ä and ê.
DOS\3: International mode, for FFS (FFS-INTL). This was the most commonly used FFS mode. (All higher dostypes have international mode always enabled.)
DOS\4: "Directory Cache" (OFS-DC) mode enabled to primitive cache by creating dedicated directory lists instead of having to pick up the linked directory/file entries that lie scattered over the disk. A certain (small) amount of disk space to store the data is allocated. The DirCache option improved directory reading speed drastically but creating, deleting and renaming files became slower. It did not increase the speed of reading individual files.
It became a popular choice on Amiga hard drives, but according to Olaf Barthel, author of FFS2, the use of dircache modes was probably better for floppy disks than it was for hard drives, where it would cause an overall degradation in performance compared to lack of dircache. Despite this it was rarely used on floppy, particularly because of the cache eating precious space, and because of the limited space preventing there being many files to cache in the first place. (According to Barthel it may also have had some serious implementation bugs that would compromise the filesystem over prolonged usage, although the specifics were never released.)
DOS\5: Directory caching with FFS (FFS-DC). Both dircache modes were not backwards compatible with earlier versions of FFS.
Version 40.1 was the last version of FFS released by Commodore, and came with AmigaOS 3.1, both on the OS disks and in the ROM. After this, several unofficial patches appeared which allowed its use on drives after the first 2 GB of a hard disk using a 64-bit addressing system called TrackDisk64 or TD64 (although the 2 GB limit on file size and the 127 GB limit on partition sizes remained, as it was a limitation of AmigaOS dos.library and all then-current Amiga software) and carried the version number of v44. The version of FFS that came with AmigaOS 3.5 and 3.9 was v45 and differed in that it used a different 64-bit addressing system, New Style Device or NSD.
More recently (from 2003), MorphOS
MorphOS
MorphOS is an Amiga-compatible computer operating system. It is a mixed proprietary and open source OS produced for the Pegasos PowerPC processor based computer, PowerUP accelerator equipped Amiga computers, and a series of Freescale development boards that use the Genesi firmware, including the...
and AmigaOS 4 have introduced support for a slightly updated "FFS2", by Olaf Barthel (FFS v46, v50 respectively). This is compatible with the older FFS. It is PowerPC
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...
native, and introduced two more dostypes (which are not capable of being read by the older FFS):
DOS\6: "Long Filename" (OFS-LNFS). This allowed files to have a longer filename (up to 107 characters) than the usual Amiga limit, which was 30 characters.
DOS\7: Long filenames for FFS (FFS-LNFS).
There were no directory caching modes available for LNFS dostypes, and International Mode was always enabled.
Despite the ability to use the long filenames, by this time FFS compared very poorly to other available filesystems on the platforms it was available for. Apart from these extra dostypes, there are little or no functional difference between FFS and FFS2 (although some older non-specified bugs may have been dealt with) and should still not be used except for legacy purposes. Disk validation is still necessary in FFS2 (and may still result in data loss) just as it was on FFS, despite early beliefs to the contrary.
Other Implementations
There were few other impementations which are able to read FFS filesystems, which would normally require an Amiga emulator and a copy of the operating system ROMs to be read. Most notably, support for affs can be compiled into Linux kernels, and offers full read, write and format support on FFS and OFS partitions of all dostypes except DOS\6 and DOS\7 (which are probably incredibly rare).On the Amiga, the freeware application xfs could, among many filesystems, read and write to devices formatted in OFS or FFS, and was probably the sole Amiga filesystem apart from FFS/FFS2 itself to do so. It did not support DOS\6 or DOS\7, or formatting of devices.
See also
- OFSAmiga Old File SystemOn the Amiga, the Old File System was the filesystem for Amiga OS before the Amiga Fast File System. Even though it used 512-byte blocks, it reserved the first small portion of each block for metadata, leaving an actual data block capacity of 488 bytes per block...
- Professional File SystemProfessional File SystemThe Professional File System is a filesystem originally developed commercially for the Amiga, it is now distributed on Aminet with a 4-clause BSD license. PFS tends to perform very well, due to the simplicity of design. Compatible successor of Ami-FileSafe....
- Smart File SystemSmart File SystemThe Smart File System is a journaling filesystem used on Amiga computers. It is designed for performance, scalability and integrity...
- List of file systems
External links
- The ADFlib Page and precisely ADF File specs
- [ftp://it.aminet.net/pub/aminet/disk/misc/ADFlib.lha The ADF specs], in LHALHA (file format)LHA is a freeware compression utility and associated file format. It was created in 1988 by , and originally named LHarc. A complete rewrite of LHarc, tentatively named LHx, was eventually released as LH. It was then renamed to LHA to avoid conflicting with the then-new MS-DOS 5.0 LH command...
format from AminetAminetAminet is the world's largest archive of Amiga-related software and files. Aminet was originally hosted by several universities' FTP sites, and is now available on CD-ROM and on the web.-History:...