whio_epfs

Not logged in

ACHTUNG: AS OF 20110523, THIS PAGE IS NOW MAINTAINED IN THE NEW WIKI: http://whiki.wanderinghorse.net/wikis/whio/?page=whio_epfs

See also: whio_dev, whio_epfs_tools, whio_epfs_namer

whio_epfs

Files: whio_epfs.h (public API), whio_epfs_config.h (configuration options), whio_epfs_internal.h (private/internal API)

whoi_epfs (hereafter called EPFS, where EPFS=Embedded Pseudo-FileSystem) is a component of the whio i/o library, originally written to replace most of the internals of libwhefs. libwhefs is this library's genetic father, and that library's web pages describe, in detail, the concepts of EPFS.

EPFS basically provides basic support for an "embedded" filesystem. A so-called container file (a.k.a. EFS container) acts as storage for a number of pseudofiles. The EFS container file, as well as the pseudofiles within an EFS, use the whio_dev interface for all i/o.

An EPFS container is similar to an archive file, like a ZIP or TAR file, except that it allows random read/write access to the files within the archive. They can grow and shrink just like normal files, but they live entirely within the EFS container file.

See whio_epfs_tools for a list of tools for manipulating EPF containers.

Library Features

Library Misfeatures

Code Status

EPFS is considered beta. It seems to work, but the nature of the problem means there are lots of room for errors. Don't use it for data you cannot afford to lose. That said, it works quite well for me, and i've not yet experienced any data loss or corruption.

Why EPFS does not support inode names

(See the whio_epfs_namer page for information about naming pseudofiles. The information below is not quite irrelevant, but some support for naming inodes was added in December 2010, and the text below is not quite up to date.)

The most notable missing feature of EPFS is the mapping of filenames to pseudofiles. Instead, it only maps unique sequential IDs to pseudofiles.

The justifications for this lacking feature is as follows...

There are many options for mapping names to inodes, with varying storage and memory requirements, as well as widely varying performance characteristics. Within libwhefs (this library's genetic father), an estimated 20-25% of the code has _something_ to do with inode names (loading, saving, searching, or caching them). Since, however, i haven't been 90% (or more) satisfied with any one inode naming solution (and i've tried a small handful of them), i decided to refactor whefs into two layers:

Benefits of the restructuring include:

Some other side effects (not necessarily benefits) of the restructuring include: