Partager via


3.2.1.5 Per Open File

If the client implements the SMB 2.1 dialect or SMB 3.x dialect family, then for each opened file (distinguished by name, as specified in section 3.2.4.3), the client MUST implement the following:

  • File.OpenTable: A table of Opens to this file.

  • File.LeaseKey: A 128-bit key generated by the client, which uniquely identifies this file's entry in the GlobalFileTable.

  • File.LeaseState: The lease level state granted for this file by the server as described in 2.2.13.2.8.

    A lease state containing SMB2_LEASE_WRITE_CACHING implies that the client has exclusive access to the file and it can choose to cache writes to the file. The client can also choose to cache byte-range locks.

    A lease state containing SMB2_LEASE_READ_CACHING implies there might be multiple readers of the file, and the client can choose to satisfy reads from its cache. The client MUST send all writes to the server.

    A lease state containing SMB2_LEASE_HANDLE_CACHING implies that the client can choose to keep open handles to the file even after the application that opened the file has closed its handles or has ended.

If the client implements the SMB 3.x dialect family, the client MUST implement the following:

  • File.LeaseEpoch: A sequence number stored by the client to track lease state changes.