{
  "slug": "smb-byte-range-lock",
  "term": "SMB byte-range lock",
  "aliases": [
    "SMB range lock"
  ],
  "definition": "An SMB byte-range lock coordinates access to a specified region of a file through shared or exclusive locking associated with a file open.",
  "note": "SMB2 ties the lock to its FileId; the client must resolve conflicts between processes on the same client. [lock] Shared locks allow reading and compatible shared locks, but no open may write in the range; exclusive locks exclude other opens from reading, writing or locking it. Unlock must match the original range, not a subrange. [lockflags] This is distinct from cache coordination, although a WRITE-caching lease can also cache byte-range locks. [client] Lock success alone is not a stable-write acknowledgement.",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-14",
  "related": [
    "smb-protocol",
    "smb-lease",
    "smb-oplock"
  ],
  "citations": [
    {
      "id": "lock",
      "title": "Microsoft MS-SMB2 section 2.2.26: SMB2 LOCK Request",
      "url": "https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/6178b960-48b6-4999-b589-669f88e9017d",
      "accessed": "2026-10-14"
    },
    {
      "id": "lockflags",
      "title": "Microsoft MS-SMB2 section 2.2.26.1: SMB2_LOCK_ELEMENT Structure",
      "url": "https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/73e941c7-9b07-42f6-8b0f-31c1a2cbf0b2",
      "accessed": "2026-10-14"
    },
    {
      "id": "client",
      "title": "Microsoft MS-SMB2 section 3.2.1.5: Per Open File",
      "url": "https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/3538a6c5-25a1-41e3-ba35-de0e0633034b",
      "accessed": "2026-10-14"
    }
  ]
}
