Expand description
In-kernel RAM filesystem — mounts on / to provide a writable root.
§Design
A single SpinLock<RamState> protects all state. The lock is held only
for the duration of each scheme call (no blocking I/O inside), so lock
contention is negligible.
Inodes are stored in a flat BTreeMap<u64, RamInode> keyed by inode number.
Directories hold a BTreeMap<String, u64> of (name → ino) children.
Files hold their content in a heap-allocated Vec<u8>.
Inode 1 is always the root directory (/).
§Path convention
path arguments arrive relative to the mount point (i.e. the leading
/ has already been stripped by the mount table resolver). An empty
string therefore means the root directory.
Structs§
- Ramfs
Scheme - Kernel-resident RAM filesystem implementing the
Schemetrait.