3.2.5.7.5 SMB2_CREATE_RESPONSE_LEASE_V2 Create Context

If Connection.Dialect belongs to the SMB 3.x dialect family and an SMB2_CREATE_RESPONSE_LEASE_V2 create context is present in the SMB2_CREATE response returned from the server, the client MUST locate the File entry corresponding to Open.FileName in the GlobalFileTable.

The client MUST evaluate Δepoch depending on the lease state change indicated in the table below. The rows in the table represent the lease state currently held by the client (File.LeaseEpoch) and the columns represent the LeaseState returned in the SMB2_CREATE_RESPONSE_LEASE_V2 create context.

Δepoch is a 16-bit signed integer indicating if the Epoch value sent by the server is newer than the current Epoch value held by the client. It is evaluated as follows:

  • If the Epoch value sent by the server is equal to File.LeaseEpoch, then Δepoch is 0.

  • If the Epoch value sent by the server is not equal to File.LeaseEpoch and Epoch value sent by the server minus File.LeaseEpoch is less than or equal to 32767, then Δepoch is greater than 0.

    New Lease State

    R

    RH

    RWH

    None

    None

    Δepoch=0 : Invalid

    Δepoch>0 : Upgrade

    Δepoch=0 : Invalid

    Δepoch>0 : Upgrade

    Δepoch=0: Invalid

    Δepoch>0: Upgrade

    R

    Δepoch=0 : No change

    Δepoch>0 : Purge cache

    Δepoch=1: Upgrade

    Δepoch>1: Upgrade & purge cache.

    Δepoch=0: Invalid.

    Δepoch=1: Upgrade

    Δepoch>1: Upgrade & purge cache.

    Δepoch=0 : Invalid

    Δepoch>0: Purge cache

    RH

    Invalid

    Δepoch=0 : No change

    Δepoch>0 : Purge cache

    Δepoch=1: Upgrade

    Δepoch>1: Upgrade & purge cache.

    Δepoch=0: Invalid

    RWH

    Invalid

    Invalid

    Δepoch=0 : No change

    Δepoch!= 0 : Invalid

When Δepoch indicates an upgrade to a new lease state, the client MUST perform the following:

  • Set File.LeaseState to the LeaseState returned in the create context.

  • Set File.LeaseEpoch to the Epoch returned in the create context.

When Δepoch indicates Purge cache, the client MUST notify the application to purge cached data for the File.

Show: