다음을 통해 공유


3.3.4.2 Object Store Indicates an OpLock Break

The underlying object store indicates an OpLock break to the SMB server by providing the following (see [MS-FSA] and [FSBO]):

  • Server.Open: The open on which the OpLock is being broken.

  • NewOpLockLevel: The level to which the OpLock was broken.

  • AcknowledgementRequired: A Boolean indicating whether the underlying object store needs an acknowledgement to complete the OpLock break.

  • ReturnStatus: The status code indicating the reason for the break.

If ReturnStatus is STATUS_SUCCESS, the server MUST notify the client identified by Server.Open.Connection by sending an asynchronous OpLock Break Notification message to the client as described later in this section. Otherwise, the OpLock break MUST be ignored.

The server MUST construct an SMB_COM_LOCKING_ANDX Request (section 2.2.4.32.1) and initialize the fields as follows:

  • The server MUST set the OPLOCK_RELEASE flag in the TypeOfLock field to indicate to the client that the OpLock is being broken.

  • The server MUST set the NewOpLockLevel field to the value returned by the underlying object store <230> to indicate the type of OpLock now in effect for the Server.Open. A value of 0 indicates that no OpLock is now held; 1 indicates that a Level II OpLock is now held.

  • The server SHOULD<231> set the Timeout, NumberOfUnlocks, NumberofLocks, and ByteCount fields to zero.

The server MUST send an SMB_COM_LOCKING_ANDX Request to the client.

If AcknowledgementRequired is TRUE, the server MUST start an OpLock Break Acknowledgment Timer (section 3.3.2.1) to fire in Server.OplockTimeout seconds if the timer is not already active, MUST set Server.Open.OplockState to Breaking, and MUST set Server.Open.OplockTimeout to the current time plus Server.OplockTimeout.

If AcknowledgementRequired is FALSE, the server MUST set Server.Open.OplockState to None.

Refer to section 3.2.5.42 for details on how the client processes an OpLock break notification.

Refer to section 3.3.5.30 for details on how a server responds to an OpLock break acknowledgment from the client.