{
  "slug": "dm-dust",
  "term": "dm-dust",
  "aliases": [
    "Device-mapper dust target"
  ],
  "definition": "dm-dust is a Linux device-mapper target that injects read errors at selected block locations and can clear those injected faults through its write path.",
  "note": "Choose block locations and enable the fault state separately; bypass mode forwards I/O without applying the injected failures. This supports preparing test data before activating a fault. Block numbers use the configured block size, not necessarily 512 bytes. [dust-doc]\n\nThe reviewed Linux v6.12 parser also accepts addbadblock with a write-failure count from 0 to 255; omitting it selects zero. While enabled, a matching mapped write decrements a positive count and fails. A later write at zero removes the entry and is forwarded. Reads keep failing while the entry remains, including when its count has reached zero. These are mapped I/O events, not a guaranteed count of application write calls. [dust-source]\n\nRemoval happens before lower-device completion. Consequently, an absent bad-block entry cannot establish successful repair, correct bytes or durability. Bypass writes do not consume the counter or remove entries. Use a zero backing-device offset when following the simple examples; v6.12 performs lookup after adding that offset. [dust-source]\n\nThe write path is selected by bio_data_dir, not payload presence. REQ_OP_DISCARD has write direction but no data payload. A zero-length REQ_OP_WRITE preflush uses the same branch when that bio reaches dust_map and its mapped location matches an enabled entry. Mapper bypass and lower layers can affect delivery; not every application flush reaches this callback. [dust-source] [bio-direction] [block-ops] [dm-empty-flush]\n\nCORDS instead injected faults through a FUSE filesystem at application-file offsets. Its FAST 2017 protocol is not reproduced merely by configuring a block target. [cords]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "Fault injection can damage test data; use only isolated, disposable storage and verify returned data separately from injector state.",
      "citationIds": [
        "dust-doc",
        "dust-source"
      ]
    },
    {
      "text": "Injected read failures do not cover all physical media faults and do not establish their frequency in production.",
      "citationIds": [
        "cords",
        "dust-source"
      ]
    }
  ],
  "related": [
    "dm-flakey",
    "fault-injection"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "dust-doc",
      "title": "Linux v6.12: dm-dust target documentation.",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/Documentation/admin-guide/device-mapper/dm-dust.rst",
      "accessed": "2026-11-30"
    },
    {
      "id": "dust-source",
      "title": "Linux v6.12: dm-dust mapping, write-failure counter and message parser.",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/md/dm-dust.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "cords",
      "title": "Ganesan et al. Redundancy Does Not Imply Fault Tolerance. FAST 2017, pp. 149-166, sections 3-4.",
      "url": "https://www.usenix.org/system/files/conference/fast17/fast17-ganesan.pdf",
      "accessed": "2026-11-30"
    },
    {
      "id": "bio-direction",
      "title": "Linux v6.12: bio_data_dir and bio_has_data distinguish direction from payload.",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/include/linux/bio.h",
      "accessed": "2026-12-01"
    },
    {
      "id": "block-ops",
      "title": "Linux v6.12: request operation values and op_is_write.",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/include/linux/blk_types.h",
      "accessed": "2026-12-01"
    },
    {
      "id": "dm-empty-flush",
      "title": "Linux v6.12: __send_empty_flush and the mapped versus bypassed flush paths.",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/md/dm.c",
      "accessed": "2026-12-01"
    }
  ],
  "updated": "2026-12-01",
  "provenance": [
    "Static source review of Linux v6.12 commit adc218676eef25575469234709c2d87185ca223a; dust_message, dust_map, dust_map_read and __dust_map_write.",
    "No device-mapper target was loaded and no block-device fault was injected.",
    "Human methods discussion: https://hesela.com/analyses/crash-testing-oracles-and-bounds/#addressed-faults",
    "The completion caveat is an inference from removal before remapping, not an observed lower-device failure.",
    "Operation-direction clarification: source-level inference from Linux v6.12 reviewed 2026-12-01, not an observed kernel experiment. No lower-device completion or current-kernel result is claimed."
  ]
}
