Embedded transaction filesystem for RAM/SRAM
fs-etfs-ram [common-options] [-Ddriver-options]
ARM, MIPS, PowerPC, SH4, x86, and XScale processors
- Update access times (atime). Default is to not update
atime, to reduce the number of flash writes.
- -b priority
- Run background reclaim at this priority. Default is 8.
- Don't detach and run in the background. This is useful for debugging.
- -c nclusters
- Set the cache size. The cache holds recently read clusters in RAM, reducing the need to access the device
if the same cluster is read again. It's also used to
combine small writes into larger writes consisting of multicluster
This reduces file fragmentation across the device and improves filesystem
startup time. Since most devices are very fast, a small cache is usually
acceptable. Larger caches may be desirable if many files are being
written with small writes concurrently. The default value is 64
clusters, where cluster size is usually 1 KB or 2 KB, depending on the device.
- -C 0|1|2
- Disable error checking/correction.
- No CRC check, no ECC correction (RAM).
- CRC check, no ECC correction (SRAM or NOR Flash).
- CRC check, ECC correction (NAND Flash).
Default: use CRCs for error checking and ECCs for
- Erase the device and create an empty filesystem
that is ready to use. For NAND flash, factory-marked bad blocks are
not erased. Blocks that become bad during normal use (worn-out blocks) are
also skipped during the erasing.
- -f numfiles
- Set maximum number of files. The default value is 4096, with a maximum of 32,767.
- -F num
- Defragment if the average extent is less than num
clusters. The value of num must be in the range
from 0 through 16. Default is 6. The fs-etfs-ram
utility doesn't defragment if num is 0.
- Perform internal integrity checks of internal data structures
while the filesystem is running. This slows down the filesystem.
Its main purpose is for debugging new
drivers and new versions of the filesystem.
- -m mountpoint
- Set the directory for fs-etfs-ram to use as its mountpoint.
On an embedded system where ETFS is the major filesystem,
this is set as -m / for taking over the root. Default is
- -o numattr
- Set the number of attributes to cache, which speeds up opens slightly.
Default is 8.
- -r kbytes
- Set the size of the raw partition /dev/etfs1, in kilobytes.
This partition, if
present, is typically used to hold a boot image made using the
mkifs utility. The default size is 0.
- Reserve a percentage of the flash to avoid issues that arise when a flash
device becomes completely full. Default is 5% (of the device size).
- Implement transaction checksum using a fast and simple sum calculation
rather than the default polynomial CRC algorithm. This may be faster but
- -s num
- Set the number of flash blocks to use as spares. One spare block is
required to perform a reclaim. During normal operation, flash devices
wear, which causes flash blocks to fail. More than one spare
block provides extra redundancy. Default is 4.
- -t sec
- Set a timer for background operations. Default is 5 seconds.
- Set verbosity. Each -v increases verbosity.
- -W erasediff
- Set wear-leveling span. Allow flash blocks to have erase
counts that differ by more than erasediff before attempting to
- force them into service if they are below erasediff
- give them a rest if they are above erasediff.
The default value is 50.
- -x nextents
- Cache this number of file extent offsets.
This option reduces the processing needed to read through file extents on
the device. Default is 8.
- Get a list of driver-specific options. This option causes the
filesystem to print a usage message and then terminate without accessing
- Set the size of the RAM disk to
nn megabytes. Default is 16 MB.
The embedded transaction filesystem (ETFS) implements a
high-reliability filesystem for use with embedded
solid-state memory devices with particular attention
to NAND flash memory. The filesystem supports a fully
hierarchical directory structure with POSIX semantics
as shown in the table
||Supported by ETFS
||Yes (if enabled with -a command-line option)
|Status change date
|Max filename length
When started, ETFS creates two devices as follows:
- Raw partition for boot image
- Filesystem partition for etfs files.
The raw partition is used for boot images and is always at
the start of the device. It may be zero bytes long if no
boot image is needed. The filesystem partition is mounted in the
pathname space as specified by the -m option.
If the -m
option is absent, the default mountpoint is /fs/etfs.
ETFS is a filesystem composed entirely of
transactions. Every write operation, whether of
user data or filesystem metadata, consists of a transaction.
A transaction either succeeds or is treated as if it never
For more information, see "Embedded transaction filesystem
(ETFS)" in the Filesystems chapter of the System
Start ETFS to implement a temporary filesystem in RAM mounted at
/tmp. Since it's not persistent across a reboot, and
since RAM is reliable, you should
disable all data error detection and correction (-C 0).
The -e option initializes an empty filesystem ready to go
upon startup. Since the filesystem is in high-speed RAM, you should
specify the smallest cache possible with
the -c 0 option.
fs-etfs-ram -C 0 -e -c 0 -m /tmp
Although ETFS supports most POSIX semantics, some functionality
isn't implemented in order to keep the driver simple and efficient.
The unsupported POSIX semantics include:
- Hard links, and related links. For example
the . and ..
directories aren't returned in a readdir().
Symlinks are fully supported.
- Access times aren't updated on the media unless
the -a option is
specified, to reduce flash writes.
- The parent directory's modification time isn't updated when the
directory content changes (files are created or deleted).
(ETFS)" in the Filesystems chapter of
the System Architecture guide.