The limits for ETFS are:
- Filename length
- 91 bytes.
- Pathname length
- 256 bytes, not including the mountpoint or the terminating NUL.
- File size
- 2 GB − 1; 32-bit filesystem limit.
- Absolute maximum number of files
- 32768 (15 bits).
- Default maximum number of files
- 4096 (controlled by the driver's -f option; see the entry for
fs-etfs-ram
in the Utilities Reference).
Note:
Filenames that are more than 32 bytes long use two directory entries,
reducing the number of files that you can actually have.
- Max cluster size
- 4096.
- Maximum filesystem size
- 64 GB.
For NAND flash, some additional limitations apply:
- Single-level cell (SLC) and multi-level cell (MLC) NAND flash are supported.
MLC NAND requires hardware error-correction code (ECC).
- The maximum filesystem size is 4 GB.
This is a practical limit, not an actual one.
When the ETFS driver starts, it scans the entire partition, recreating its own representation of the data;
the larger the partition, the longer this takes.
- ECC protection of the spare area is supported only on 2 KB and 4 KB page NAND.
- The software ECC supports only 1-bit error correction, for each 256-byte buffer.
- Only NAND flash with page sizes of 512, 2048, and 4096 bytes are supported.
Note:
For ETFS on NAND, you can perform 1-bit software error correction coding (ECC)
for the data in the spare area.
Support configurations are available for:
- 2 KB page NAND flash devices
- 4 KB page NAND flash devices
Once calculated, the spare area receives the ECC value from devio_postcluster(),
and then writes it to NAND flash.
To determine the appropriately sized ECC value, use the following:
- For 512 NAND, it's not available
- For 2048 NAND, use 64 byte ECC
- For 4096 NAND, use 128 byte ECC
To take advantage of the spare area, you'll need to make the following changes for BSPs:
- For devio_readtrans() and devio_readcluster()—When
reading the spare area, first save the spare area ECC, and then set those fields of the spare structure
to 0xFF, which is required for calculating the cyclic redundancy check
(CRC—data integrity checks for NAND).
Perform the CRC calculation and if it fails, then in order to recover, you must attempt using the
new spare area ECC value. If the spare area CRC is correct, then you can skip the ECC operation.
If the ECC can correct the spare area, then set tacode in the transaction structure
to ETFS_TRANS_ECC.
If the ECC can't be corrected, then set the tacode to ETFS_TRANS_DATAERR.
- For devio_postcluster()—After calculating the CRC and ECC for the
cluster data, and calculating the CRC for the spare area, add a calculation for the ECC of the spare area.
When doing the CRC calculation, use 0xFF as placeholder values for the spare area ECC.