{
  "slug": "dm-flakey",
  "term": "dm-flakey",
  "aliases": [
    "Device-mapper flakey target"
  ],
  "definition": "dm-flakey is a Linux device-mapper target that alternates normal block I/O with configured error, write-drop or data-corruption behavior.",
  "note": "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. [flakey-doc]\n\nLinux 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. [flakey-source]\n\nRebello 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. [rebello]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "Use only disposable, isolated storage: an injector can damage the filesystem and application data being tested.",
      "citationIds": [
        "flakey-doc"
      ]
    },
    {
      "text": "The reviewed v6.12 path passes zone-management operations through; it does not inject every command class.",
      "citationIds": [
        "flakey-source"
      ]
    }
  ],
  "related": [
    "fault-injection",
    "fault-model",
    "lost-write",
    "writeback-error",
    "crash-test-oracle"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "flakey-doc",
      "title": "Linux v6.12: dm-flakey target parameters and feature behavior",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/Documentation/admin-guide/device-mapper/dm-flakey.rst",
      "accessed": "2026-11-07"
    },
    {
      "id": "flakey-source",
      "title": "Linux v6.12: dm-flakey byte replacement, cloning and I/O mapping",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/md/dm-flakey.c",
      "accessed": "2026-11-07"
    },
    {
      "id": "rebello",
      "title": "Rebello et al., Can Applications Recover from fsync Failures? USENIX ATC 2020, sections 3.2 and 4",
      "url": "https://www.usenix.org/system/files/atc20-rebello.pdf",
      "accessed": "2026-11-07"
    }
  ],
  "updated": "2026-11-07",
  "provenance": [
    "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."
  ]
}
