-
Notifications
You must be signed in to change notification settings - Fork 1
LLFS
The Linked-List File System (LLFS) is a compact file system designed for storage media with a capacity of up to 64KB, utilizing a 256-byte block size. This system is particularly suitable for environments with limited storage requirements, such as embedded systems.
Uses a 256-byte block size. The first sector is designated as the "index sector," serving as the file allocation table.
Can contain up to 15 file descriptors. Supports multiple index sectors for scalability within the volume.
Defined by the lf_record_t structure, which is packed and aligned for efficiency:
| Field | Size (bytes) | Description |
|---|---|---|
fptr |
1 | Sector pointer. |
attr |
1 | File attribute. |
rptr |
2 | Reference pointer, 0 for root. |
name |
12 | File name. |
Designed for small volumes with a sector count up to 254. Sectors 0 and 255 are reserved for index sectors, optimizing file descriptor storage and retrieval.
LLFS provides a streamlined way to manage files on small-volume media, leveraging a linked-list structure for efficient file indexing and retrieval.
| Offset | Size (bytes) | Description |
|---|---|---|
| 0 | 16 |
lf_phy_t structure containing volume metadata. |
| 16-31 | 16 |
lf_record_t - file descriptor (1st block). |
| 32-47 | 16 |
lf_record_t - file descriptor (2nd block). |
| ... | ... | ... |
| 224-239 | 16 |
lf_record_t - file descriptor (15th block). |
| 240-255 | 16 | last lf_record_t descriptor with attr set to LLFS_ATTR_INDEX and last byte set to LLFS_MARK_INDEX_BYTE |
The first record in the first index sector is a physical media description:
| Field | Size (bytes) | Description |
|---|---|---|
fsType |
1 | File system type, value 0xdb. |
fsTypeN |
1 | Complement of fsType. |
devID |
2 | Device identifier. |
secCount |
2 | Number of sectors in the volume. |
compress |
1 | Compression type, LLFS_COMPRESS_NONE. |
ecc |
1 | ECC base size, LLFS_ECC_NONE. |
name |
8 | Volume name. |