EFS : Extent File System

Thu Nov 21 18:41:30 1996
Yasushi Saito


Overview

EFS is a file system interface to the extent. It provides a flat, persistent naming on the extent block. All the files on the EFS occupy contiguous blocks on the disk.

EFS is mainly used for swapping.

Design and Implementation

Each mount point of EFS uses a single local disk partition, much like other file systems. EFS uses the first 8192 bytes of the partition as the metadata region. The metadata records what files are located where. Since the size of metadata is fixed, the maximum number of files on a partition is also fixed. All the files occupy contiguous blocks on the disk, and although EFS supports file resizing, it is very inefficient. So you might want to fix the size of a file right after it is created.

Using the service

Since EFS is a file system, it is mounted in the usual way.
mount extentdev efs directory
In the above, extentdev is an extent device name that is created beforehand. directory is a path that points to a preexisting directory. Below is an example.
extent mkdev rz3a efsextent -size 167772160
newfs efs efsextent
mkdir /efs
mount efs efsextent /efs
touch /efs/swap
mkfile /efs/swap 8388608

Reading and Writing

Once a file is created, it can be read and written (yes, it's writable!) using the file system methods.

The read/write position and size must be multiple of the disk block size(usually 512 bytes).

The overhead of file system methods versas direct extent manipulation is just one procedure call, so you usually don't have to care about it. However, if you want to save that teeny overhead, use getExtent method defined on EFS.T object, which is a subtype of File.T.


yasushi@cs.washington.edu