In addition to Alex’s suggestions, I would also note that there is a verifier option that will return STATUS_PENDING to essentially all I/O operations.
I have found that applications sometimes ask for asynchronous I/O and don’t respond well when they get it, which it sounds like be the issue in this case. NTFS, for example, might just process that request synchronously while my file system posts it much more aggressively (both are legitimate and correct, by the way.) Such applications are broken.
An application that does NOT ask for asynchronous I/O (e.g., it sets the FILE_SYNCHRONOUS_IO_NONALERT or FILE_SYNCHRONOUS_IO_ALERT option) will not experience an issue here because the I/O Manager will make the I/O synchronous in any case.
Thus, to get into this situation, you’d need an application that opens a file for “overlapped I/O” (Win32 speak) and then chokes when it GETS overlapped I/O. That’s an application bug. If that’s the issue in Exchange, they should fix it, except (of course) they might say “this doesn’t happen on NTFS.” That’s where the verifier option could be useful because you could say “well, actually it DOES happen on NTFS when I’m running it under Verifier.”
In the past when we’ve run into this, we’ve suggested to customers how they can build special work-arounds for this scenario (e.g., you build a heuristic for detecting this case and change behavior to make Exchange happy.) Even if it isn’t a bug in your code, that can often be difficult to explain to a customer.
Tony
OSR
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doug
Sent: Saturday, October 16, 2010 7:36 AM
To: ntfsd redirect
Subject: [ntfsd] Exchange and filter drivers
It’s taken a long time and talking to a number of engineers, but I finally found someone that knew about Exchange and filter driver interactions:
http://support.microsoft.com/kb/2009604
http://support.microsoft.com/?id=967479
I pass this on in case any of your customers might run into this like mine have.
My question: How can a filter “force all file I/O operations to be performed asynchronously”?
The only thing I can think of that might possibly be at all related would be to deny fast I/O, return FLT_PREOP_SYNCHRONIZE or call FltDoCompletionProcessingWhenSafe. But that’s a stretch, and even then, it seems mighty hard to believe it would affect something in user space.
Doug
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) 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