The question is, fairly simple, if I filter all fast I/O writes, should I out filter the delayed writes that come from lazy writer with toplevelirp==2 ?
I’ve seen some bizzare things when a file is mapped. I saw no fast I/O but I’ve seen toplevelirp=2 writes, so this clearly answers my question, but how can a CreateFileMapping bypass my FS_FILTER_CALLBACKS , and more preciselly my preFilterOperation, when “Data->Parameters.AcquireForSectionSynchronization.SyncType == SyncTypeCreateSection” .
I try to catch all files that have been opened with any type of write access, I never see this though from notepad, but I’ve made a little application
CreateFile
CreateFileMapping -> triggers my callback
CloseFile
MapViewOfFile
modify in memory
UnmapView
CloseFileMapping
this does the expected in my driver.
When opened by notepad, I also tried the MmCanFileBeTruncated, way, called in Cleanup, but still no luck, the file acts as if it was not mapped, but in file spy I see delayed writes comming from mmod writer and also from cache manager.
I know the solver of all pbems would be waiting for close request, and I know then all references held from VMM and CacheManager will be released and so all data flushed, but I need interactivity, so I must know if a file is being memory written, so I can force flushes for those files, after a cleanup.
So my 2 questions remain:
- does fast io cover all cache manager activity
- why don’t I get my callback for section creation called, and how can I find out if a file object has an open user section.