{
  "slug": "dm-zero",
  "term": "dm-zero",
  "aliases": [
    "device-mapper zero target",
    "zero target"
  ],
  "definition": "dm-zero is a Linux device-mapper target that supplies zero-filled ordinary reads and silently discards writes.",
  "note": "The zero target has no target-specific parameters and retains no written payload. A large mapped address range therefore does not reserve storage. It behaves like a block-device counterpart of /dev/zero, not a writable sparse file. [dm-zero-guide]\n\nLinux v6.12 zero_map completes ordinary reads with zeros and silently completes writes and discards. A read bio marked REQ_RAHEAD is instead rejected; other operation types reaching this callback are also rejected. These are target-level behaviors, not guarantees about an application's buffered reads. [dm-zero-code]\n\nThe documented sparse-device construction puts a snapshot over the zero origin and stores changed chunks on a separate copy-on-write device. That additional layer retains writes; its finite backing space must be monitored. The zero target alone cannot provide this retention. [dm-zero-guide] [dm-snapshot-guide]",
  "advantages": [
    "Provides a zero-valued origin without allocating a matching payload backing device."
  ],
  "limitations": [
    "Neither zero-filled reads nor successful discarded writes demonstrate that previously stored data was erased."
  ],
  "related": [
    "device-mapper",
    "dm-error",
    "snapshot"
  ],
  "citations": [
    {
      "id": "dm-zero-guide",
      "title": "Linux v6.12: zero target and snapshot-backed sparse devices",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/Documentation/admin-guide/device-mapper/zero.rst",
      "accessed": "2026-12-01"
    },
    {
      "id": "dm-zero-code",
      "title": "Linux v6.12: dm-zero ordinary reads, readahead, writes and discard",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/md/dm-zero.c",
      "accessed": "2026-12-01"
    },
    {
      "id": "dm-snapshot-guide",
      "title": "Linux v6.12: snapshot COW storage, chunks and exhaustion",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/Documentation/admin-guide/device-mapper/snapshot.rst",
      "accessed": "2026-12-01"
    }
  ],
  "provenance": [
    "Source review of Linux v6.12, pinned to commit adc218676eef25575469234709c2d87185ca223a; no device creation, fault injection or performance experiment."
  ],
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-01"
}
