Thank you for Tony’s reply, we fix the issue.
The bug that we had before, but only show up on Windows Vista with SP1, look like without SP1, we are luck that still work, I think CopyFileEx is change in SP1, we got CcCopyRead and CcCopyWrite with large value as 512 KB, before we check if IrpContext->Wait is not wait, we will FsdPostRequest, this is not correct, it will wait for WrPageOut, but works with small value.
Thanks,
Tao
Subject: RE: [ntfsd] CcCopyRead and CcCopyWrite don’t finish if Length in bytes of the data is 0x80000 (512 KB) on Windows VistaDate: Thu, 14 Aug 2008 13:53:46 -0400From: xxxxx@osr.comTo: xxxxx@lists.osr.com
Well, if it?s hung, it means the thread are waiting for something to happen. The question is ?For what are they waiting??
64KB is a magic number in virtual memory ? it?s the unit of granular mapping in the memory manager. 256KB is a magic number as well as it?s the unit of address management in the cache manager. So when you see something that ?works? in one case but not in another and the units involved are one of these it suggests you?re invoking some additional processing in one of these components (e.g., faulting in more data, extending sections, creating new VACBs, etc.)
I?ve used CcCopyRead with values much larger than 64KB. It is not an issue of the cache manager, but rather some operation your call is invoking that is in turn relying on you (or someone else) to fulfill. What does the debugger say? When you look at the stack trace of the thread that called CcCopyRead, what does it say the thread is waiting to have happen? If you figure that out, then try to determine why that event is not occurring. It could be (for example) that you are getting a callback into your file system driver to acquire a lock and you?ve decided to use a non-reentrant lock (e.g., synchronization event or fast mutex) or you?ve acquired an ERESOURCE in ?shared? mode and then in the same thread (via a callback) tried to acquire it in ?exclusive? mode (this *always* deadlocks and *never* tells you before it does so.)
Of course I assume you?re running on the checked version of the NT kernel and it?s not reporting anything interesting. Naturally, you?d also be using driver verifier and similarly *it* isn?t reporting anything. Finally, of course, since you didn?t report anything unusual, I assume that ?!deadlock? said there was nothing it could find.
Tony
OSR
— NTFSD is sponsored by OSR For our schedule debugging and file system seminars (including our new fs mini-filter seminar) visit: http://www.osr.com/seminars You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’ To unsubscribe send a blank email to xxxxx@lists.osr.com