{
  "slug": "block-device",
  "term": "Block device",
  "aliases": [],
  "definition": "A block device is an operating-system device abstraction that exposes storage through addressable blocks, whether its backing is physical, virtual or memory-resident.",
  "note": "Identity: In Linux, a block special file has type S_IFBLK. Its st_rdev identifies the represented device; st_dev instead identifies the device associated with the filesystem containing that inode. The device node and the storage it represents are different objects. [inode]\n\nBacking: A loop device maps blocks to a regular file or another block device. A filesystem image in a file can therefore be accessed through a block-device interface without becoming a physical disk. Linux permits LOOP_CHANGE_FD only for a read-only loop device whose replacement backing store matches the old store in size and type. Consequently, an unchanged device node is not proof of an unchanged backing image. [loop]\n\nPersistence: zram stores compressed pages in RAM and can optionally write selected pages to a configured backing device. Block addressing alone does not establish persistence after power loss. [zram]\n\nRequests: Linux blk-mq connects userspace or filesystems to block-device drivers. Requests may be merged or reordered, and the block layer does not itself guarantee completion order. [blk-mq]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "block-storage",
    "block-device-read-only",
    "zram",
    "zoned-block-device",
    "character-device"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-15",
  "citations": [
    {
      "id": "inode",
      "title": "Linux man-pages: inode(7), file type and represented-device identity",
      "url": "https://man7.org/linux/man-pages/man7/inode.7.html",
      "accessed": "2026-11-15"
    },
    {
      "id": "loop",
      "title": "Linux man-pages: loop(4), file-backed and block-backed loop devices",
      "url": "https://man7.org/linux/man-pages/man4/loop.4.html",
      "accessed": "2026-11-15"
    },
    {
      "id": "zram",
      "title": "Linux 6.12: zram, compressed RAM backing and optional writeback",
      "url": "https://docs.kernel.org/6.12/admin-guide/blockdev/zram.html",
      "accessed": "2026-11-15"
    },
    {
      "id": "blk-mq",
      "title": "Linux 6.12: Multi-Queue Block IO Queueing Mechanism",
      "url": "https://docs.kernel.org/6.12/block/blk-mq.html",
      "accessed": "2026-11-15"
    },
    {
      "id": "hesela",
      "title": "Hesela: Btrfs recovery, represented devices and read-only scopes",
      "url": "https://hesela.com/analyses/btrfs-tree-log-read-only-replay/#block-device-identity",
      "accessed": "2026-11-15"
    }
  ],
  "provenance": [
    "The concrete identity fields and driver examples describe Linux, not a universal device API.",
    "Documentation synthesis, not a native block-device or power-loss experiment."
  ]
}
