{
  "slug": "command-descriptor-block",
  "term": "Command descriptor block (CDB)",
  "aliases": [
    "CDB",
    "SCSI CDB"
  ],
  "definition": "A command descriptor block (CDB) is the byte-encoded description of a SCSI command.",
  "note": "Command and data: The CDB identifies a command and is distinct from its associated data payload. Common fixed-length formats are 6, 10, 12 and 16 bytes; the operation and command set determine the layout. [snia-cdb] [linux-guide]\n\nInterpretation: Decode the command using the applicable device command set, such as SBC for block devices or SSC for sequential-access devices. A shared SCSI transport does not make their operations interchangeable. [t10-architecture]\n\nTransfer counts: For direct-access block devices, legacy READ(6) uses a one-byte transfer-length field where zero specifies 256 logical blocks. READ(10) uses a two-byte block count where zero requests no logical blocks. These are requested block counts, not CDB byte lengths or proof of completed transfer. Linux v6.12 decodes the two forms accordingly. [read-count-manual] [read-count-linux]\n\nMeasurement: The sg_read zero-block mode times command overhead using READ(10), READ(12) or READ(16). Its completed-command rate does not establish a user-data byte rate; READ(6) does not share that zero-block interpretation. [read-count-tool]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "scsi",
    "initiator-target",
    "logical-unit-number",
    "scsi-check-condition"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "snia-cdb",
      "title": "SNIA dictionary: Command Descriptor Block",
      "url": "https://www.snia.org/education/online-dictionary/term/command-descriptor-block",
      "accessed": "2026-10-20"
    },
    {
      "id": "linux-guide",
      "title": "Linux SCSI Interfaces Guide: protocol versus bus and subsystem layers",
      "url": "https://docs.kernel.org/driver-api/scsi.html",
      "accessed": "2026-10-20"
    },
    {
      "id": "t10-architecture",
      "title": "T10: SCSI standards architecture and command families",
      "url": "https://www.t10.org/drafts.htm",
      "accessed": "2026-10-20"
    },
    {
      "id": "read-count-manual",
      "title": "Seagate SCSI Commands Reference Manual, Rev. L (2020), sections 3.17-3.18",
      "url": "https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068L.pdf",
      "accessed": "2026-10-28"
    },
    {
      "id": "read-count-linux",
      "title": "Linux v6.12: scsi_trace_rw6 and scsi_trace_rw10 transfer-count decoding",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.12/drivers/scsi/scsi_trace.c",
      "accessed": "2026-10-28"
    },
    {
      "id": "read-count-tool",
      "title": "sg3_utils v1.48: sg_read(8), zero-block command-overhead timing",
      "url": "https://raw.githubusercontent.com/hreinecke/sg3_utils/v1.48/doc/sg_read.8",
      "accessed": "2026-10-28"
    }
  ],
  "provenance": [
    "The listed fixed lengths are examples, not an exhaustive limit on SCSI command formats.",
    "The zero-count contrast concerns direct-access block commands, not tape READ(6). The cited manual labels block READ(6) obsolete; support is not implied for every device. [read-count-manual]"
  ],
  "updated": "2026-10-28"
}
