dm-flakey
dm-flakey is a Linux device-mapper target that alternates normal block I/O with configured error, write-drop or data-corruption behavior.
The up and down intervals select time windows, not an exact number of failed operations. During a down window, error_writes reports a write error, while drop_writes discards writes without reporting that failure. These modes test different recovery assumptions. [1]
Linux v6.12 modifies matching write-data bios through a private clone. If clone allocation fails, flakey_map falls through to remapping the original bio without the requested byte corruption. Fixed-byte replacement also has no effect when its position lies beyond the bio data or the existing byte already equals the replacement. A configured corruption attempt therefore does not establish altered bytes. [2]
Rebello et al. used a custom, targeted block injector for filesystem tests, then CuttleFS for application tests. A periodic dm-flakey configuration is not the same experimental protocol. [3]
Relations
Limitations
- Use only disposable, isolated storage: an injector can damage the filesystem and application data being tested. [1]
- The reviewed v6.12 path passes zone-management operations through; it does not inject every command class. [2]
Citations
- Linux v6.12: dm-flakey target parameters and feature behavior
- Linux v6.12: dm-flakey byte replacement, cloning and I/O mapping
- Rebello et al., Can Applications Recover from fsync Failures? USENIX ATC 2020, sections 3.2 and 4
Sources & caveats
- Source review of immutable Linux v6.12 commit adc218676eef25575469234709c2d87185ca223a.
- No device-mapper target was loaded and no storage fault was injected; the allocation fallback is a control-flow finding, not a measured frequency.