Happy New Year!!!
I am trying to write the simple network redirector for W2K and I have
a few problems with terminating of file caching.
My problems concerning the interaction between IRP_MJ_READ,
IRP_MJ_CLEANUP and IRP_MJ_CLOSE requests.
When an test application closes the file (i.e. _close()), my driver
gets the IRP_MJ_CLEANUP. If I use the caching of file ( i.e. I use
CcInitializeCacheMap(), CcSetReadAheadGranularity() and CcCopyRead()
in read() subroutine and CcFlushCache(), CcPurgeCache() and
CcUninitializeCacheMap() in cleanup() subroutine) the FSD doesn’t receive
the IRP_MJ_CLOSE request for this file. It is first problem.
The second problem: The CcUninitializeCacheMap() always return FALSE
for caching and non caching files. Is it correct?
The third problem: in 1 - 2 seconds after the completion of IPR_MJ_CLEANUP
request for caching file, the system breaks in DbgBreakPoint in EXWORKER
and I see the follow messages:
>EXWORKER: exception in worker routine 80414C70(FD90D6A8)
> exception record at F1437BC4
> context record at F143781C
>ntoskrnl!DbgBreakPoint:
>804a3ce4 cc int 3
>kd> kb
>
>ChildEBP RetAddr Args to Child
>f14376e0 8041c1c9 80401020 00000000 f1437d98 ntoskrnl!DbgBreakPoint
>f143770c 8041c0f3 80414c70 fd90d6a8 f143773c
ntoskrnl!ExpWorkerThreadFilter+0x61
>f1437da8 804a331a 00000000 00000000 00000000
ntoskrnl!ExpWorkerThread+0x191
>f1437ddc 804bdd7a 8041bf62 00000000 00000000
ntoskrnl!PspSystemThreadStartup+0x54
>00000000 00000000 00000000 00000000 00000000 ntoskrnl!KiThreadStartup+0x16
>
To continue I must press twice the ‘g’ key.
The confusion is that if I delete CcUninitializeCacheMap() from
cleanup() subroutine, I have not this problem.
My questions:
- What are the reasons of this problems?
- Where can I find the correct sequence of using the Cache Manager
and Memory Manager interface for full terminating of file caching?
I found in ntfsd archive that similar problem was discussed by Mark Twain,
Maxim S. Shatskih, Jack Brown and Inaki Castillo at April 2000.
What are their opinions?
Thanks in advance.
Nikolay Naumov
E-mail: xxxxx@mikron.ru
Mikron Corporation, http://www.mikron.ru
Moscow, Russia
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