The Amiga Fast File System (abbreviated AFFS, or more commonly historically as FFS) is a file system used on the Amiga personal computer from the computer-manufacturer Commodore Int'l. The previous Amiga filesystem was never given a specific name and known originally simply as "DOS" or AmigaDOS. Upon the release of FFS and for purposes of differentiation, the original filesystem became retrospectively known as Amiga's Old File System, shortened OFS. The former file-system OFS, which was primarily designed for use with floppy disks, had been proving slow to keep up with hard drives of the era.

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.

Characteristics

OFS was the predecessor to FFS. Before FFS was released, AmigaOS had a single filesystem simply called AmigaDOS: this uses 24 bytes per sector for redundancy data, providing for reconstructing structural data on less reliable media such as floppy disks. 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. The redundancy was removed with FFS and the data read in from media are passed to the application directly. The previous filesystem, AmigaDOS, was renamed OFS, Old File System, to differentiate between it and FFS. FFS was backward-compatible and could access devices formatted with OFS.

Given these advantages, FFS was rapidly adopted as the most common filesystem used by almost all Amiga users, although OFS continued to be widely used on floppy disks from third-party 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, although they could still read them if they had FFS installed.) FFS is still used on AmigaOS systems and shipped with both MorphOS and AmigaOS 4.

By the last Commodore release of AmigaOS, 3.1, FFS was still the only filesystem shipped as standard with the Amiga, but it was already showing its age as technology advanced. FFS (and OFS) stores a "bitmap" of the filesystem in a single sector. On write, this is first marked as invalid, then the write is completed, then the bitmap is updated and marked as valid. If a write operation is interrupted by a crash or disk removal, this then allows the 'disk-validator' program to undo the damage. This resembled a very simple form of filesystem journaling. To allow the disk to be used again with an invalidated OFS or FFS filesystem, the entire disk has to be completely scanned and the bitmap rebuilt, but only the data being modified during the write would be lost. During this scanning the disk cannot be written to (except by the disk-validator as it performs its function), and read access is very slow.

AmigaOS originally included a disk-validator on every bootable disk, which was prone to being replaced by viruses to allow themselves to spread (for example the "Saddam Hussein" virus). Later it became part of the ROM from Kickstart 2.x onwards, protecting it from malicious replacement. The disk-validator attempted to repair the bitmap on an invalidated drive 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 some cases the validator could fail and leave the disk in a non-validated state, requiring the user to use a third-party disk tool like DiskSalv to make the volume writable again, or simply save the files by copying them to a fresh partition.

FFS was also originally limited to 32-bit addressing and therefore about 4 GB drives, or at least the first 4 GB on a larger drive. Attempting to use FFS partitions beyond this limit caused serious data corruption all through the drive. FFS belatedly got some third-party 64-bit patches and then official (but non-Commodore) updates to allow it to circumvent these limitations. The latter were supplied with AmigaOS 3.5 and 3.9, from Haage & Partner. The former often were supplied with third-party disk controllers, such as those from Phase5, where the ability to use large-capacity disks was a selling point. The two systems were not mutually compatible.

In terms of support tools, although Commodore itself only shipped with an application called DiskDoctor (and later removed it from AmigaOS disks), FFS had a small selection of third-party tools—most notably 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 and this made it inaccessible to everything but the tool defragmenting it. Most of these tools were not updated when FFS became capable of 64-bit addressing and could only operate on partitions smaller than 4 GB; they could not read partitions bigger than 4 GB, and would generally corrupt partitions "beyond" the 4 GB boundary. When hard drives in use by Amiga users were reaching 4 GB in size, this became a problem.

For all of these reasons, FFS was often replaced by users in 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. SFS continued to be developed and is the default filesystem for AROS.

History

FFS was introduced with version 1.3 of AmigaOS in 1988,1.3 release confirmed on September 16, 1988, by Carolyn Scheppner of CATS in amiga.dev in BIX. Copy of BIX announcement from USENET and replaced both the Kickstart ROM (or Kickstart floppy for A1000s) and Workbench floppy with updated software. It carried the version number of v34, like the rest of the AmigaOS 1.3 components.

Kickstart 1.3 provided autobooting support so that the machine could now be booted from hard disk or reset-proof RAM disk ("RAD:"), whereas earlier Kickstart releases could only be booted from floppy disk. Workbench 1.3 provided the FFS filesystem device driver on disk, which could be copied into the Rigid Disk Block (RDB) on hard disks. Compliant block devices would then load and install the filesystem driver before filesystems were mounted and thus make it possible to use loadable filesystems on hard disks. Kickstart 1.2 could boot Workbench 1.3 from floppy (and vice versa), but it needed both Kickstart and Workbench 1.3 to autoboot FFS-formatted hard disks.

FFS support was merged into the ROM-based filesystem from Kickstart 2.0 onwards, and so it was no longer necessary to install FFS in the RDB. The ability to load filesystems from the RDB still remained available in case one wished to fix ROM bugs, get new FFS features, or use a third-party filesystem.

Floppies are unpartitioned devices without a RDB and also do not use the autobooting mechanism, so were only bootable if the disk's dostype was one the ROM-based filesystem understood. As a result, FFS-formatted floppies were not bootable until the release of Kickstart 2.0, and mounting them under Workbench 1.3 involved some ugly unsupported hacks. Similarly, "Directory Cache" variants were not bootable or supported until Kickstart 3.0.

The various FFS flavours did not have any compatibility problems with Amiga software, even ones that were considered "system-unfriendly". Software would either use the system calls and thus work with any filesystem, or be "trackloaders" and not use a filesystem at all.

FFS Modes FFS operated in several modes, defined as and by "DOS types". AmigaOS filesystems are identified by a four letter-descriptor which is specified either in the RDB or a so-called 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.

The FFS-DOStypes introduced with AmigaOS v1.3 (v34) were as follows:AmigaOS user manual 3.1 DOSType Type AmigaDOS DOS\0 The former filesystem, Original File System (OFS). The filesystem the Amiga used until then – Then consequently referred to as Original File System, short OFS. DOS\1 The new filesystem, FastFileSystem (FFS). The first, disk-based release of FFS – The original FastFileSystem did not offer any additional modes. The former primary Amiga filesystem, now called OFS, was taken over and integrated into FFS using the first DOS Type DOS\0 for purposes of backward-compatibility. As the majority floppy-disks shipped by software-companies or as magazine-coverdisks still used this DOS type (which would boot on pre-2.x machines like the Amiga 500), this enabled users with existing OFS-formatted drives, that all older OFS-based disks could still be read afterwards, once they had installed FFS to the RDB of their start-disk. Note: Although DOSType DOS\0 is based on the former OFS, this FFS-mode is still not backward-compatible with Workbench below 2.0.

AmigaOS 2.04 made FFS (now v37) part of the Kickstart ROM and introduced new modes for handling international characters in filenames,All Amiga file systems can handle international characters but prior to the International versions they treated upper and lower cased letters as completely distinct characters. and for an on-disk directory cache. Each new mode was available with both OFS- and FFS-DOSTypes. This odd system was for reasons of parity: OFS-modes apart from DOS\0 were almost never used but were available nonetheless.

The new FFS-DOStypes introduced with AmigaOS v2.04 (v37): DOSType Type AmigaDOS DOS\2 Mode International (OFS-INTL) for the former OFS. Allows OFS the use of international characters. DOS\3 Mode International (FFS-INTL) for the new FFS. Allows FFS the use of international characters – This was the most commonly used FFS-mode overall. The "International"-mode of the respective DOS-Types enabled both file-systems the use of international characters and thus the handling of file- and folder-names with characters, which are not found in English Latin character-set (ISO/IEC 8859-1), such as ä, ê, î, ö and ü. → All higher DOS-Types have International-mode integrated by default Note: Although DOSType DOS\2 is based on the OFS, that Int'l mode-extension is still not backward-compatible with purely OFS-based Amiga-systems without FFS.

The last published major version of FFS by Commodore (v39), saw the following FFS-DOSTypes being introduced with AmigaOS v3.0: DOSType Type AmigaDOS DOS\4 Mode Directory Cache (OFS-DC) for the former OFS. Allows OFS the use of primitive directory-caching. DOS\5 Mode Directory Cache (FFS-DC) for the new FFS. Allows FFS the use of primitive directory-caching. This mode enables primitive directory-caching, 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 directory data is allocated.

The DirCache-option improved directory reading-in speed drastically but creating, deleting and renaming files became slower. It did not increase the speed of reading individual files.