Fly Fishing File System

San Francisco USENIX Conference 1992 – Contest

The conference contest, “Name That File System”, was a great success, with several hundred (yes, you read that right) entries. The rules read as follows:

In the beginning, there was the file system, and it was good enough for the disk technology of the time. Then disks got bigger, and the block size was expanded from 512 bytes to 1K, and the 1KFS was born.

But this was not Good Enough, and so the Fast File System (FFS) had to be. And it came, and 1KFS went.

Then the Sun rose in the west, and there were networks, and NFS (Network File System) came to pass. But the east wanted to get in on the deal, and so there was RFS (Remote File System) too.

But there also had to be a local file system, and so the file system switch was born of virgin parents. And that was the end of self-control.

Now we have LFS (Log Structured File System), TFS (Translucent File System), MFS (Memory-based File System – the file system that has files and is a system, but isn’t a file system), and being introduced at this conference, the 3DFS (Three-Dimensional File System). Not to mention a few others (which I won’t mention).

What’s next? Surely we can think of something! Like: SFS – Stochastic File System. When you open a file, it opens a file at random. Opens go very quickly, and it is useful for selecting random input to programs. (No – I couldn’t use the name RFS [Random File System] here, because the initials were taken). MMFS – Mickey Mouse File System. Runs in your watch. LIFS – Language Independent File System. You have to do a set_locale() call before you open the file; all text files are translated into the appropriate language on reads and writes. SSFS – Slow SLIP File System. Carefully tuned to give performance commensurate with Serial Line IP over a 1200-baud modem. (Also, note the rare triply nested acronym [S [=Slow] S [=S [= Serial] L [=Line] IP [= Internet Protocol]] F [=File] S [=System]].) SMFS o_+ Send- mail File System. I don’t know what this does, but I had to propose it now to avoid the obvious submissions. In any case, the semantics are certainly defined by rewriting rules.

The rules of the contest are simple:

(1) All submissions must have an “XXFS” style name and a one-line expansion of the initials.
(2) There must be a (short) semantic description of the file system. Short and snappy is better than full descriptions (after all, we can always read the man page).
(3) All submissions must have your name and email address. Teams are OK, but pick one person to act as a representative.
(4) Submissions are due by 5:00 PM on Thursday. Boxes will be set up in the registration area.
(5) We’ll try to publish all submissions in ;login: and in comp.org.usenix, so try to make your submissions printable.
(6) Winners will be announced at 3:20 PM Friday (immediately before the last session).
(7) Decisions of the (guaranteed biased, arbitrary, etc.) judges are final.
(8) Prizes cannot be returned.
(9) There may be other arbitrary rules added as we think them up.

We ignored some of our own rules (as specifically permitted; we made rules that unmade rules), as will be clear in the winning entries.

The biased panel of judges apologizes if it missed some especially good ones; when you read that many, your definition of what is funny seems to get a bit blurry.

Whilst not winning a special award went to the following entry for being the only submission that actually compiles, printed here in its entirety.

The Code

/*
* Copyright (c) 1992 The Regents of the Restaurant of Le Central.
* All rights deserved.
*
* Fly-Fishing File system (FFFS) public definitions.
*
* This source code is derived from a restaurant tablecloth scribbled on
* by Eric Brunner, Marc Donner, Jan-Simon Pendry and Bucky Pope.
*
* Redistribution and use in cooked and raw forms, with or without garlic,
* are permitted provided that the following conditions are met:
* 1. Redistributions of fish must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in cooked form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* menu and/or other materials provided with the food.
* 3. All advertising materials mentioning features or use of this fish
* must display the following acknowledgement:
* This food includes fish caught with the Fly-Fishing Filesystem
* developed at the Restaurant of Le Central by its diners.
* 4. Neither the name of the Restaurant nor the names of its diners
* may be used to endorse or promote fast food products derived from
* this fish without specific prior written permission.
*
* 1.2 (Le Central) 1/22/92
*/

#ifndef _FFFS_H
#define _FFFS_H

/*
* NB: Requires the new “live”, “dead” and “fresh” type
* modifiers in ANSI C.
*/

#include /* for fishing license and legal size */
#include /* for type pan */
#include /* for struct lure and struct line */

#define LEGAL_SIZE(fish) (sizeof(fish) > TOO_SMALL)

/* to kill the fish, just cast it to “dead” */
#define KILL(fish) ((dead) (fish))

struct fish;
struct bite;
typedef struct bite meal[10];

/*
* VFS (victual file system) operations for FFFS.
*/

/*
* cast() takes a lure, casts it and returns a pointer to the fishing line.
* on error it returns null and sets errno to one of:
*
* ECALIFORNIA – No water.
*/
struct line *cast(const struct lure *fly);

/*
* hook() takes a pointer to a fishing line and returns
* a fish descriptor (fd).
*/
int hook(const struct line *l);

/*
* reel() takes a fish descriptor and returns a pointer to a fish.
* reel() closes the fish descriptor (fd).
* on error it returns null and sets errno to one of:
*
* EBADF – Bad Fish.
* ECONNABORTED – It got away.
* ENETUNREACH – Fishing net unreachable.
* ETOOBIG – The one that got away.
*/
live struct fish *reel(int fd);

/*
* unhook() removes the fish from the hook, returning the fresh fish
*/
live struct fish unhook(live struct fish *catch);

/*
* release() returns the live fish to the free pool.
*/
void release(live struct fish f);

/*
* fry() takes a fish, and a pan and makes a meal.
* on error it returns null and sets errno to one of:
*
* EBONES – Fish couldn’t be filleted.
* EINEDIBLE – Fish caught off Long Island.
* ENOSPC – Frying pan full.
* ESTALE – Fish not fresh.
* ETOOSMALL – Fish is illegally small.
*/
fresh meal *fry(dead struct fish f, pan p);

#endif /* _FFFS_H */

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.