{
  "slug": "dm-error",
  "term": "dm-error",
  "aliases": [
    "device-mapper error target",
    "error target"
  ],
  "definition": "dm-error is a Linux device-mapper target that fails mapped data I/O instead of supplying data or retaining writes.",
  "note": "In Linux v6.12, the bio and request mapping callbacks return DM_MAPIO_KILL. Discard handling is explicitly advertised so a mapped discard fails as I/O rather than merely being unsupported. Optional backing-device arguments supply device limits, not successful read/write forwarding. [dm-error-code]\n\nThe bio-based core translates DM_MAPIO_KILL into BLK_STS_IOERR. This is an internal block-layer result, not a direct return value from read() or write(). Cached reads and deferred writeback above the target can change what an application observes. [dm-core-flush]\n\nEmpty flushes follow a separate path: the core skips targets with num_flush_bios equal to zero, and the reviewed error target does not request flush bios. Its failing mapping callbacks therefore do not establish that every application synchronization call must fail. [dm-core-flush] [dm-error-code]\n\nTesting scope: IRON File Systems selects faults by block type and workload, and compares faulty runs with fault-free controls. A uniformly failing mapping does not provide that coverage; record which requests actually reached the target. [iron-method]",
  "advantages": [
    "Provides an explicit failing mapping for unavailable logical-volume regions."
  ],
  "limitations": [
    "Is not a probabilistic media-failure model or a complete test of an application's recovery behavior."
  ],
  "related": [
    "device-mapper",
    "dm-zero",
    "dm-flakey"
  ],
  "citations": [
    {
      "id": "dm-error-code",
      "title": "Linux v6.12: error target mapping callbacks and optional device limits",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/md/dm-target.c",
      "accessed": "2026-12-01"
    },
    {
      "id": "dm-core-flush",
      "title": "Linux v6.12: bio error completion and empty-flush target selection",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/md/dm.c",
      "accessed": "2026-12-01"
    },
    {
      "id": "iron-method",
      "title": "Prabhakaran et al., IRON File Systems, SOSP 2005, section 4: failure-policy fingerprinting",
      "url": "https://research.cs.wisc.edu/adsl/Publications/iron-sosp05.pdf",
      "accessed": "2026-12-01"
    }
  ],
  "provenance": [
    "Source review of Linux v6.12, pinned to commit adc218676eef25575469234709c2d87185ca223a; no device creation or native failure experiment."
  ],
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-01"
}
