Skip to main content

Module disk

Module disk 

Source
Expand description

Virtual durable store with injectable faults (spec section 9.5, FND-005).

Each simulated node owns a VirtualDisk. Bytes pass through two stages: pending (written, not yet durable) and durable (fsynced). VirtualDisk::crash models power loss by discarding every pending byte: crash recovery exposes exactly the fsynced prefix, and unsynced data is lost. Tests can inject write failures, fsync failures, and torn (partial) writes.

Structs§

VirtualDisk
A crashable virtual disk with two-stage durability and fault knobs.

Enums§

DiskError
The failure surface of a virtual disk operation.