Export (0) Print
Expand All Receiving an SMB2 FLUSH Request

When the server receives a request with an SMB2 header with a Command value equal to SMB2 FLUSH, message handling proceeds as follows:

The server MUST locate the session, as specified in section

The server MUST locate the tree connection, as specified in section

Next the server MUST locate the open being flushed by performing a lookup in the Session.OpenTable, using the FileId.Volatile of the request as the lookup key. If no open is found, or if Open.DurableFileId is not equal to FileId.Persistent, the server MUST fail the request with STATUS_FILE_CLOSED. Otherwise, the server MUST locate the Request in Connection.RequestList for which Request.MessageId matches the MessageId value in the SMB2 header, and set Request.Open to the Open.

The server MUST issue a request to the underlying object store to flush any cached data for Open.LocalOpen.<280> If this is a file, the object store MUST propagate any cached data to persistent storage. If this is a named pipe, the server MUST wait for all data written to the pipe to be consumed by a reader. This operation MUST block until the flush is complete. (The server SHOULD<281> choose to handle this request asynchronously, as specified in section

If the operation succeeds, the server MUST initialize a response following the syntax specified in section 2.2.18.

If the operation fails, the server MUST return the error code to the client.

The status code returned by this operation MUST be one of those defined in [MS-ERREF]. Common status codes returned by this operation include:












© 2014 Microsoft