Re: [ntfsd] Question on IRP_MJ_FLUSH_BUFFERS behavior

Depending on the implementation of lower layers, any IRP could be synchronous or asynchronous - you have no way to know, but you should always handle both cases and this one is no exception

In UM, the API is documented to by synchronous and therefore its implementation must handle the case of async completion using one of the standard methods

Sent from Surface Pro

From: xxxxx@hotmail.com
Sent: ‎Friday‎, ‎May‎ ‎15‎, ‎2015 ‎10‎:‎52‎ ‎AM
To: Windows File Systems Devs Interest List

Thanks Gabriel and Maxim.

From application perspective after it calls FlushFileBuffers(), should it assume all necessary data is flushed to the disk? The MSDN docs suggests so.

Also, do you mean to say that blocking nature of FlushFileBuffers() is implemented in that API and not in underline FS? Which I think is unlikely.

So minifilter would get PreOp, pass it down to FS, FS will do necessary writes and then complete the IRP. So minifilter would see PostOp of the IRP.

But I don’t see any writes before PostOp. I also tried to normal ReadFile() just to give hint to the cache manager to init the caching.

Am I missing anything?


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer