dm-log-writes
dm-log-writes is a Linux device-mapper target that records block modifications on a separate device for controlled replay and filesystem checks.
Ordinary completed writes wait for a later PREFLUSH. At flush mapping, the target captures the completed-write list; on completion, it queues that captured batch and the flush record. A write completing between those two events is not added retroactively. FUA requests take a separate completion path, while ordinary discards follow the pending-write ordering. [1] [2]
A mark is an annotation, not a flush. In the reviewed v6.12 log_mark path it joins the logging queue without draining unflushed_blocks. The final teardown marker is different: destruction first moves remaining entries. A replay endpoint therefore needs a stated synchronization contract. [2]
Record successful synchronization, backing-I/O errors and logger status separately. The v6.12 completion callback does not filter records by the error argument; a log entry is not a successful-write receipt. Treat logging_disabled as an incomplete recording, not a passing test. [2]
CrashMonkey also records system calls to identify explicitly persisted files and directories for its oracle. A block log by itself does not supply that application-level expectation or reproduce the OSDI 2018 experiment. [3]
Relations
- related
- Device-mapper, Crash-test oracle
Limitations
- Logging and replay require isolated disposable storage; neither a complete trace nor a passing checker proves all crash states are safe. [1, 3]
Citations
- Linux v6.12: dm-log-writes ordering, marks and replay interface.
- Linux v6.12: log_writes_map, normal_end_io, log_mark, teardown and logger status.
- Mohan et al. Finding Crash-Consistency Bugs with Bounded Black-Box Crash Testing. OSDI 2018, pp. 33-50, sections 4.4 and 5.1.
Sources & caveats
- Static review of Linux v6.12 commit adc218676eef25575469234709c2d87185ca223a. No kernel target was loaded and no physical storage failure was tested.
- Original success-path queue model and tests: https://hesela.dev/research/dm-log-writes/model.mjs and https://hesela.dev/research/dm-log-writes/model.test.mjs.
- Human interpretation and limits: https://hesela.com/analyses/crash-testing-oracles-and-bounds/#dm-log-writes