File system flush

The read/write from a opened file with this flag
FILE_NO_INTERMEDIATE_BUFFERING does not store the data in cache. Is it
possible that opening a file with FILE_NO_INTERMEDIATE_BUFFERING result in a
file system flush. Because any ways file object needs to be maintained
irrespective of caching is enabled or disabled for the time till the file is
opened. because we need file object in IRP. but while opening a file, if
cache manager is full then is their cache flush happened before this file is
opened


Regards
Rohit Gauba

Is it possible that opening a file with FILE_NO_INTERMEDIATE_BUFFERING result in a file system flush.

Yes, it is possible. But it’s not certain if the flush will happen

at create time, it depends entirely on the FSD’s implementation.

Yes, the data need to remain consistent, so eventual cached

data need to be flushed before they are read as non-cached.

However, it is also possible that FSD will flush the file in the moment

of first data transfer (read or write).

L.


In fact, if the file is opened for no caching and for caching, the
no-cached I/O will cause flushing of the data in the cache. I have seen
applications that mix cached and non-cached I/O in this fashion and each
time the write is done non-cached the cache is flushed (and purged).

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com