FLUSH: Flush File

The flush SMB is sent to ensure all data and allocation information for the corresponding file has been written to stable storage. When the fid has a value -1 (hex FFFF) the server performs a flush for all file handles associated with the client and pid. The response is not sent until the writes are complete.

Client Request
==================================
Description
=================================
UCHAR WordCount; Count of parameter words = 1
USHORT Fid; File handle
USHORT ByteCount; Count of data bytes = 0

This client request is probably expensive to perform at the server, since the server's operating system is generally scheduling disk writes is a way which is optimal for the system's read and write activity integrated over the entire population of clients. This message from a client "interferes" with the server's ability to optimally schedule the disk activity; clients are discouraged from overuse of this SMB request.

Server Response
==================================
Description
=================================
UCHAR WordCount; Count of parameter words = 0
USHORT ByteCount; Count of data bytes = 0

Errors

ERRDOS/ERRbadfid
ERRSRV/ERRinvid
ERRSRV/ERRbaduid