Professional Filing System (c) 1993 by Michiel Pelt   Release 1.0 Version 6.11 7-12-1993 1. Distribution Conditions This program is copyright (c) 1993 by Michiel Pelt. It may be distributed freely under the condition that no profit is gained from its distribution, nor from any other program distributed in the same package. Permission is granted to distribute this package by Bulletin Board systems or network sites, under the condition that no fee is charged on downloading it. All files that are part of this package have to be distributed together and none of them may be changed in any way other than archiving or crunching. The only exception to this rule are the icons, including the tooltypes, which may be changed to accomodate them to the rest of the disk it is distributed on. This program is distibuted as shareware. If you like this product you should register. Disclaimer These programs are provided "as is" without warranty of any kind. All risks involved using these programs are entirely yours. The author assumes no responsibility or liability whatsoever for any damage or dataloss caused by using this package. Although everything has been done to make sure the program is fully functional, the author cannot guarantee this for a 100%. 2. Introduction The standard AmigaDos filesystem (OFS) is very slow. Commodore has tried to improve the performance of their filesystem a number of times. Workbench 2.0 added the fast filing system (FFS), and now, with Workbench 3.0, we have the fast filing system with directory caching (FFS-DC). This makes directoryscan faster but writing to disk and directory-operations like delete and rename are slower than ever. This made me decide to write a filesystem that does better. I used all the knowledge I gained from my computer science study to make it as good as possible. The professional filing system (PFS) has the following features: High performance - write: 2-3 times faster - read: 50% faster - directoryscan: 10-20 times FFS, 3 times FFS-DC - delete/rename/protect etc: 10-20 times faster Other features - full AmigaDos compatibility - upto 10% more data on a disk - better faulttolerance - parralel access almost without performance loss - disks NEVER get invalidated This version of the filesystem is for floppy disks only. Both double density and high density disks are supported. A version suitable for harddisk is being worked on and will be available to registered users only. System requirements PFS will work on any Amiga with kickstart 2.0 or higher. It accepts both double- and highdensity diskdrives. A harddisk or at least two diskdrives is recommended. The amount of memory PFS uses depends on the contents of the disks present. It will vary between 30 and 60K per drive. 3. Installation Quick start If you want to try PFS first, just doubleclick on the "PF0" icon. "PF0:" now refers to PFS disks in drive 0. Now proceed to chapter 4 about formatting and using PFS disks. Installation on Workbench 2.0 First you have to boot from your standard systemdisk or harddisk. Now execute the "install2.0" script by calling it from the shell or doubleclicking its icon. This script will copy the filesystem to the l: directory of your systemdisk and add two entries to your mountlist, PF0: and PF1:. To use the filesystem you have to mount it using the mount command: MOUNT pf0: MOUNT pf1: "PF0:" and "PF1:" now refer to PFS disks in drive 0 and 1. If you want to have PFS mounted on startup you should add these commands to your startup-sequence. Installation on Workbench 2.1/3.0 First you have to boot from your standard systemdisk or harddisk. Now execute the "install3.0" script by calling it from the shell or doubleclicking its icon. This script will copy the filesystem to the l: directory of your systemdisk and put two files in your SYS:Storage/DOSDrivers directory called PF0 and PF1. Doubleclicking their icons will mount the filesystem on the corresponding drive. "PF0:" and "PF1:" then refer to PFS disks in drive 0 and 1. If you want to have PFS automaticly mounted on startup you can move the PF0 and PF1 files to your Devs:DOSDrivers directory. Turbo users If you are the proud owner of a 68020+ machine you can, after installing the filesystem normally, replace the 68000 version in the l: directory with the 68020+ version (you can find this in the l drawer). Make sure the name of the filesystem is the same as stated in the mountlist. You can do that by renaming the filesystem in "ProfFileSystem" or by changing the mountlist. Making and changing mountlistentries If you have more than two drives, or you don't like the default devicenames, you can change the mountlistentries to suit your needs. Note that the "Buffers" keyword has no meaning with this version of the filesystem. Its merely added for future compatibility. 4. Using PFS disks Formatting disks After mounting you can format floppies in PFS format by using the standard c:format command. To format a disk named "hello" type: format drive pf0: name hello If the disk has been formatted before, you can use the quick option, even if the previous format was FFS or OFS (this works the other way around too). format drive pf0: name hello quick Accessing disks Shell use: PFS disks can be referenced to by diskname (e.g. "hello:") or by mountname (e.g. pf0: or pf1:). Almost all cli-commands work on PFS disks like on any other disk, only faster. Workbench use: When a PFS disk is inserted in drive 0 two icons will appear on your workbench: one with label "DF0:PFS" and one with the diskname as label. The first comes from the standard filesystem, the second from the PFS filesystem. You can access the disk through the latter icon. It will behave just like df0:, only faster. Differences with FFS/OFS When you use the c:list command the 'blocks used' information will be to high. The list command assumes every file consumes a block of free space to use as headerblock. This filesystem uses blocks much more efficient, however. As a rule of thumb you can say that the real number of blocks used is the given amount minus the number of files listed. You can check this with the "info" command, which does give the correct amount. Directory tools like Directory Opus have the same problem with their spaceleft figure during a copy session. You'll notice that after copying is finished the figure will go up, back to the real figure. You'll probably understand now that there generally goes more on a PFS disk than on a FFS disk. PFS uses a larger part of the blocks for actual data storage. Programs asking the filesystem information about a pfs disk will be fooled into believing the disk is a FFS disk. I do this to prevent those programs from saying it's not a dos disk without giving the information requested to the user (e.g. the "info" command). The "c:AddBuffers" command used on pfs devices won't have any effect on the cache, nor on memoryusage. PFS uses a dynamic directory- and allocationblock caching algorithm, without any cachelimits. This won't take too much memory (max about 30K), because the number of directoryblocks on a floppydisk is limited. 5. AmigaDos compatibility All Amiga-Dos features are implemented except hardlinks, filechange notification and recordlocks which are not used much anyway. All these features may be implemented in a future version, though. A PFS disk currently cannot be made bootable, so a PFS disk cannot be "installed". 6. Restrictions PFS has the standard Amigados restrictions on file and disk naming: - maximum disknamelength 32 - maximum filenamelength 108 - maximum commentlength 80 - almost unrestricted characteruse in filenames These restrictions are forced by AmigaDos, they are not inherent to the filesystem. The number of files in a directory or on a disk is restricted by available diskspace only. 7. Faulttolerance If you reset or crash your machine during a write operation a standard AmigaDos disk gets 'invalidated'. When you insert that disk later the disk will be revalidated automaticly. After this the directory is back in the state it was before the writeoperation. This actually is a neat feature, but it has two drawbacks: revalidating takes time and, if you were overwriting a file at the time of the crash, you lose both the original and the new version, since the file has been half overwritten. The directory states falsely that nothing happened, however. With PFS the directory is correct at all times. This means that whenever you remove the disk ¹), reset or crash the system, all the objects (files and directories) listed in the directory will be there as stated in that directory, including the filesize and date. In other words: a PFS disk NEVER gets invalidated. This does not mean you cannot lose any data, however. This is how it works: when you operate on the disk (creating files and directories, deleting files etc) the filesystem keeps track of all changes to the directory but doesn't write these changes to the disk until the operation is completed. It does write the data but only to clean areas, that is, diskspace that wasn't in use the last time the directory was updated. If that's not possible anymore, or you stop writing to the disk for half a second, the directory is updated so that the area occupied by deleted files can be reused without invalidating the disk. So if the machine brakes down at a nasty moment you will probably find the disk in the state it was before you started your writing session. This includes overwritten files: they'll be back in their old state, unless the free diskspace didn't allow it (only in that case both versions could be gone ²). The directory and allocationtables themselves are also updated in such a way that the disk cannot become invalidated. So even a crash during the update won't invalidate the disk. An extra advantage of this procedure is that files that are overwritten by a larger version are not fragmented, as in most filesystems. The file will be fragmented only when there is no large enough continuous free segment available. A fragmented file is even defragmented if possible. Disadvantages are that the freespace on the disk gets more fragmented than strictly necessary and that the directory has to be updated more often. PFS does everything it can to limit freespace-fragmentation as much as possible. A PFS disk normally cannot get invalidated but it can get corrupted. Nothing can be done against bad tracks on a disk or external programs (like virusses or diskeditors) that mess with the disk. A read or write error makes a disk invalid. There currently is no utility available to recover corrupted disks. ¹) You should not remove the disk during an operation on purpose. If you do, you'll probably get a read/write error and a "You MUST insert volume xxx" request. After this a "Not a dos disk" system request will appear. Simply select retry and the operation will be continued. ²) If you want to make sure you can't lose a file by overwriting it you should keep in mind that the filesystem can only guarantee that if the free diskspace is more than the size of the old version + the size of the new version + 5K. Then the directory will be updated after the new version has been written and not between deleting the old and writing the new version. Virus damage and viruskillers Bootblock virusses destroy the bootblock of the disk. For this reason the filesystem doesn't store unrecoverable data in those blocks. It does use the bootblock to recognize a disk as being a PFS disk, so if the bootblock is destroyed, the disk in question won't be recognized anymore. To repair such a disk you simple have to write a PFS bootblock back to it. You can do that by copying a bootblock of an uninfected disk to the disk in question. Most viruskillers have functions to do that. Remember not to change any blocks other than the bootblocks (block 0 and 1). Most viruskillers have no problem with PFS disks. You should check if your viruskiller accepts uninfected pfsdisks as normal, however. 8. Performance The PFS filing system is a lot faster. I have done a little test. I took a few empty disks and measured the time it took to copy a directory from harddisk to those disks and do some operations on this directory afterwards. The results are listed below. All figures are in seconds and all display output is redirected to NIL:. The stated directory totals 65 files and 560054 bytes. These figures are measured on a A4000/040. diskformat-> PFS HD PFS DD FFS HD FFS-DD FFS-DC DD ----------------------------------------------------------------------- write all 54 55 196 130 133 read all 25 27 38 37 39 show dir <1 <1 13 9 1 delete all 3 3 50 40 41 Diskspace left 311K 279K 277K after write ----------------------------------------------------------------------- High density disks profit the most, as you see. FFS doesn't seem to handle high density disks very well. There's another problem with OFS/FFS disks: writing or reading simultaniously to one disk is very slow. With PFS, however, you'll hardly notice the difference with sequential access. The writeperformance of PFS disks declines when the disk is almost full. The disk gets more fragmented and the directory has to be updated more often (p.s. any filesystem has this problem, including FFS). If you want to keep the writeperformance high its wise to leave 30-50 K free. Readperformance is hardly influenced by the disk being full, however. A filesystem cannot change the physical transfer-rate between computer and diskdrive. In fact PFS uses the same "trackdisk-device" as FFS does. So diskspeed-testers probably won't show much improvement, accept for the filesystem specific tests like directory- scan, filecreate, -delete, -rename, -open, -close etc. If the disk gets very fragmented you can create an optimized disk simply by copying all files to a new disk. 9. The future An enhanced version is planned which will offer the following features: - optimized for harddisk - speed optimization on almost full disks - better recoverability of corrupted disks - all Amigados features supported (including hardlinks, notification) - better cachehandling There are also some tools planned: - optimizer - repair/recover utility - undelete - analyse/status This version will only be available to registered users and is expected to be available by February/March 1994. I don't guarantee anything, however. Bugfixes will be available to anyone, that is, updates involving bugfixes will be released as public domain. 10. Tips and tricks Here are some tips for diskuse. Most of them work on FFS disks too - If you want to copy files from one floppy to another using only one drive, don't copy directly (e.g. copy disk1:#? disk2:), but use the ram disk (e.g. copy disk1:#? ram: followed by copy ram:#? disk2:). - Writing all .info files in a directory first and then all other files puts the .info files close together. Now the workbench can read all the icons a lot faster. - When a file on a PFS disk is fragmented, and there is sufficient continuous free space available, you can defragment the file simply by overwriting it. 11. Bugs There are no know bugs in this version of PFS. If you find something that doesn't function properly please let me know. 12. Registration If you like this product you should register. As a registered user you will be informed of new versions. The first update, to the planned enhanced version including utilities, will be free of charge. If you wish to make utilities for PFS you can request programmers information on the registration form under 'requests'. The registration fee including the update to the enhanced version is f25 Dutch Guilders. European residents can use Eurocheques by writing them out in Dutch Guilders. Don't use cheques in another currency, since the bank charges f15 transfercosts for that. Payment in cash is also possible. In other currencies the fee is slightly higher to take transfer costs into account: US $15, DM 25, £10 or the equivalent in another currency. Please sent this completed form to: Michiel Pelt Waalstraat 328 7523 RS Enschede The Netherlands ----------------------------------------------------------------------- Registration form Name: ______________________________________________________ Address: ______________________________________________________ ______________________________________________________ ______________________________________________________ ______________________________________________________ Computer: ________________________________________________ Kickstart version: _______________________________________ Diskdrivers: _______________________________________ Harddisk size & controller: _______________________________________ Memory Available: _______________________________________ Funds enclosed: ____________ The most important thing to add/change to/in PFS is: ______________________________________________________________ ______________________________________________________________ ______________________________________________________________ ______________________________________________________________ ______________________________________________________________ Comments/requests/found bugs ______________________________________________________________ ______________________________________________________________ ______________________________________________________________ ______________________________________________________________ ______________________________________________________________