{
  "slug": "dm-linear",
  "term": "dm-linear",
  "aliases": [
    "Device-mapper linear target"
  ],
  "definition": "dm-linear is a Linux device-mapper target that maps a contiguous logical-sector range onto an equal-length range of one backing block device.",
  "note": "Scope: Several linear entries can concatenate backing ranges. Unlike dm-striped, ordinary concatenation does not cycle fixed-size chunks across destinations, but concurrent I/O to different devices remains possible. [linear-guide] [striped-guide]\n\nAddressing: For logical start S, length N and backing offset O, sector L in [S, S + N) maps to O + (L - S). These are 512-byte address units, not necessarily the device's logical or physical block size. Core checks also constrain backing capacity and alignment; arithmetic alone does not establish table acceptance. [linear-code] [target-offset] [units] [table-code]\n\nExample: With S = 1024, N = 16 and O = 128, logical sectors 1024 through 1039 map to backing sectors 128 through 143. Sector 1040 is outside the entry. Executable arithmetic tests cover boundaries and nonzero starts without loading a mapping. [mapping-example]\n\nAliasing: Two entries on the same backing device, starting at 0 and 16 with length 16 and offset 128, both map their first sector to backing sector 128. They name the same storage, not two independent copies. A write through one alias can replace bytes addressed through another; immediate coherence of buffered reads is not promised. This follows from address translation. [linear-code] [mapping-example]\n\nLimits: The target adds neither mirrors nor parity, although lower layers may supply redundancy. Changing the mapping does not itself relocate existing bytes. Logical size does not prove unique backing capacity or independent failure domains. [linear-code]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "device-mapper",
    "dm-striped",
    "lvm",
    "volume-manager"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "linear-guide",
      "title": "Linux v6.12: linear mappings and joining devices",
      "url": "https://docs.kernel.org/6.12/admin-guide/device-mapper/linear.html",
      "accessed": "2026-12-01"
    },
    {
      "id": "striped-guide",
      "title": "Linux v6.12: striped target and chunk placement",
      "url": "https://docs.kernel.org/6.12/admin-guide/device-mapper/striped.html",
      "accessed": "2026-12-01"
    },
    {
      "id": "linear-code",
      "title": "Linux v6.12: linear_map_sector and linear_map",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/md/dm-linear.c",
      "accessed": "2026-12-01"
    },
    {
      "id": "target-offset",
      "title": "Linux v6.12: dm_target_offset subtracts the target begin",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/include/linux/device-mapper.h",
      "accessed": "2026-12-01"
    },
    {
      "id": "units",
      "title": "Linux v6.12: sector_t and 512-byte sector units",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/include/linux/blk_types.h",
      "accessed": "2026-12-01"
    },
    {
      "id": "table-code",
      "title": "Linux v6.12: logical adjacency, backing extent and alignment checks",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/drivers/md/dm-table.c",
      "accessed": "2026-12-01"
    },
    {
      "id": "mapping-example",
      "title": "Hesela: arithmetic-only linear address translation and boundary tests",
      "url": "https://hesela.dev/research/dm-linear/README.md",
      "accessed": "2026-12-01"
    }
  ],
  "updated": "2026-12-01",
  "provenance": [
    "Primary-source synthesis pinned to Linux v6.12; no block devices, filesystems or storage configurations were created or modified.",
    "Aliasing examples are deductions from address translation, not hardware measurements or claims about filesystem cache coherence.",
    "The executable model tests sector arithmetic only; it is not a kernel table validator or a deployment recipe."
  ]
}
