{
  "slug": "alignment-offset",
  "term": "Alignment offset",
  "aliases": [
    "alignment_offset",
    "BLKALIGNOFF"
  ],
  "definition": "Alignment offset describes the byte displacement of a block device or partition start from the storage stack's natural alignment.",
  "note": "Query the path actually used. In Linux 6.12, bdev_alignment_offset incorporates a partition's start and returns -1 when the queue carries a misaligned-topology flag. This sentinel is not a byte displacement. [linux-limits]\n\nThe signed blockdev --getalignoff query preserves -1. Partition sysfs in that kernel instead formats the result as unsigned and can show 4294967295; do not apply either sentinel as an ordinary offset. [blockdev-signed] [linux-partition]\n\nFor compatible partition limits, Linux uses G = max(physical_block_size, minimum_io_size) and computes (G + parent_offset - (start_bytes mod G)) mod G. For G=4096, parent_offset=0 and start_bytes=1049088, the result is 3584, not 512. This is a calculated example, not a device observation. [linux-limits]",
  "advantages": [
    {
      "text": "Distinguishes a partition's start geometry from its parent's queue-size hints.",
      "citationIds": [
        "linux-abi",
        "lsblk"
      ]
    }
  ],
  "limitations": [
    {
      "text": "A zero displacement does not establish correct buffer alignment for every I/O API.",
      "citationIds": [
        "linux-abi"
      ]
    }
  ],
  "related": [
    "partition-alignment",
    "logical-sector",
    "physical-sector",
    "minimum-io-size",
    "optimal-io-size",
    "direct-io-alignment"
  ],
  "provenance": [
    "The sentinel and partition formatting are implementation details verified in Linux v6.12 and util-linux v2.40.2, not a promise about all releases."
  ],
  "citations": [
    {
      "id": "linux-abi",
      "title": "Linux 6.12: stable sysfs block ABI, sector sizes and I/O topology",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.12/Documentation/ABI/stable/sysfs-block",
      "accessed": "2026-10-19"
    },
    {
      "id": "linux-limits",
      "title": "Linux 6.12: block limits validation and bdev_alignment_offset",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.12/block/blk-settings.c",
      "accessed": "2026-10-19"
    },
    {
      "id": "linux-partition",
      "title": "Linux 6.12: partition alignment_offset_show unsigned formatting",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.12/block/partitions/core.c",
      "accessed": "2026-10-19"
    },
    {
      "id": "blockdev-signed",
      "title": "util-linux 2.40.2: signed BLKALIGNOFF query formatting",
      "url": "https://raw.githubusercontent.com/util-linux/util-linux/v2.40.2/disk-utils/blockdev.c",
      "accessed": "2026-10-19"
    },
    {
      "id": "lsblk",
      "title": "util-linux 2.40.2: lsblk explicit columns and inherited queue attributes",
      "url": "https://raw.githubusercontent.com/util-linux/util-linux/v2.40.2/misc-utils/lsblk.8.adoc",
      "accessed": "2026-10-19"
    },
    {
      "id": "hesela-sector-alignment",
      "title": "Hesela: 512e, 4Kn and alignment: geometry is not durability",
      "url": "https://hesela.com/analyses/sector-sizes-alignment-not-durability/",
      "accessed": "2026-10-19"
    }
  ],
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-19"
}
