{
  "slug": "smb-oplock",
  "term": "SMB opportunistic lock",
  "aliases": [
    "SMB oplock",
    "SMB opportunistic locking"
  ],
  "definition": "An SMB opportunistic lock is a revocable server-granted caching arrangement that lets a client reduce network operations while coordinating access to a file.",
  "note": "Oplocks coordinate cache use; they are not application byte-range locks. [oplocks] Classic SMB2 oplock levels and leases have distinct request encodings: a lease requires its create context, and its request level is invalid for SMB 2.0.2. [create] Do not assume every break needs an acknowledgement: the level-II-to-none transition does not. [break] These caching arrangements do not by themselves acknowledge durable data storage.",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-14",
  "related": [
    "smb-protocol",
    "smb-lease",
    "smb-byte-range-lock"
  ],
  "citations": [
    {
      "id": "oplocks",
      "title": "Microsoft Win32: Opportunistic Locks",
      "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/opportunistic-locks",
      "accessed": "2026-10-14"
    },
    {
      "id": "create",
      "title": "Microsoft MS-SMB2 section 2.2.13: SMB2 CREATE Request",
      "url": "https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/e8fb45c1-a03d-44ca-b7ae-47385cfd7997",
      "accessed": "2026-10-14"
    },
    {
      "id": "break",
      "title": "Microsoft MS-SMB2 section 2.2.24.1: Oplock Break Acknowledgment",
      "url": "https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/8b2f9f49-93de-479c-81c2-795b1059deea",
      "accessed": "2026-10-14"
    }
  ]
}
