FS_CommitFile(
PIOREQ pir
)
The cached buffers for a specific file are committed to disk through FS_CommitFile. This routine handles the Win32 function: FlushFileBuffers(); and Int21 function: 68h.
All of the cached or buffered data for a specific file must be written out to disk when this function is called.
Processing Option Values:
The following options may be specified: |
|
Value | Meaning |
---|---|
FILE_NO_LAST_ACCESS_DATE | Do not update last access date on the close operation even if it is currently enabled for the volume. This flag is a special flag that is passed in when a volume is locked down not allowing writes, so that there are no write operations done to the disk in all cases. |
FILE_COMMIT_ASYNC | Commit the data for the file to the disk asynchronously. If this option is not passed in, the commit must flush the dirty data for the open file synchronously to the disk. |
The FILE_COMMIT_ASYNC flag is provided as an optimization. By default, commits are synchronous and do not return to the user without flushing the data to the disk. There are certain kinds of applications that make a high number of commit calls and committing the data asynchronously substantially improves the performance of such applications. The IFS manager turns this flag on based on a system registry setting. FSDs should not attempt to interpret the system registry settings independent of the IFS manager. There are certain situations such as the presence of volume locks, when the IFS manager forces all commit operations to be synchronous.