Hi all,
I’m having a little trouble with my filter driver. Open receiving a Create
request for one of my files, I use ZwCreateFile on the lower file system to
open the physical file.
All goes well until my file gets a Cleanup call. Here, I flush and
uninitialise my cache map but it refuses to go as a DataSection still
exists. Is this to be expected?
The reason why this is important is that that final job of my Cleanup
routine is to call ZwClose on the physical file. If I don’t block the
Cleanup until the cache has gone, I’ll get paging writes from my cache and
will be unable to write the data to disk. (I’m doing non-paged writes to
the lower file system on a file that will have now been cleaned’up)
If I move the ZwClose call to my Close routine my paging problem is fixed,
but often, the Close call is in the context of another process, and so the
ZwClose fails. Is it possible to schedule thread in the context of the
existing process, in order to close the file?
Alternatively, in my Create routine, it it possible to create the physical
file, reference it, and close it without it sending a Cleanup message to
the file system? This will allow me to write the paged data after my
Cleanup routine has run.
My final solution was to open and close my file in a process created by my
driver and in the context of the System user. Is it possible to do this?
Many thanks,
Andy Larter
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com