{
  "slug": "nvme-compare-and-write",
  "term": "NVMe Compare and Write",
  "aliases": [
    "NVMe fused Compare and Write"
  ],
  "definition": "NVMe Compare and Write is an optional fused operation that conditionally replaces an LBA range when its stored contents match supplied comparison data.",
  "note": "SPDK submits the pair with first/second fusion flags, adjacent on one queue and using the same range; submission is not completion. [spdk-fused] Compare success alone cannot establish Write success; inspect both completion records and the applicable size and boundary limits. [nvme-fused-spec] A constructed slot-claim model enumerates the race in separate compare/write steps; it is not a hardware measurement. [hesela-fused]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "The operation does not by itself fence delayed writes to other addresses or provide an application-wide transaction.",
      "citationIds": [
        "hesela-fused"
      ]
    }
  ],
  "related": [
    "compare-and-swap",
    "nvme-reservation",
    "conditional-write",
    "linearizability"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "nvme-fused-spec",
      "title": "NVM Express 1.3d (2019), sections 4.10 and 6.2.1; Identify Controller ACWU. Copyright 2007-2019 NVM Express, Inc.",
      "url": "https://nvmexpress.org/wp-content/uploads/NVM-Express-1_3d-2019.03.20-Ratified.pdf",
      "accessed": "2026-10-21"
    },
    {
      "id": "spdk-fused",
      "title": "SPDK NVMe Driver: asynchronous I/O, fused operations and queue-pair ownership",
      "url": "https://spdk.io/doc/nvme.html",
      "accessed": "2026-10-21"
    },
    {
      "id": "hesela-fused",
      "title": "Hesela: NVMe conditional updates and complete constructed schedules",
      "url": "https://hesela.com/analyses/storage-consistency-ordering/#nvme-fused",
      "accessed": "2026-10-21"
    }
  ],
  "updated": "2026-10-21"
}
