It’s not clear what you’re asking. For example, in the pre-read or
pre-write routines, you can get the filename of the file being read/written
with FltGetFileNameInformation(). You can deny Fast I/O with:
if( FLT_IS_FASTIO_OPERATION( Data ) )
return FLT_PREOP_DISALLOW_FASTIO;
In this case, the I/O will be performed as a normal (IRP-based) I/O.
Lots of other strange and wonderful things are possible, too. For instance,
the Vpb is only defined for local files. This lets you ignore open files on
remote systems within the pre-read or pre-write routines:
if( NULL == FltObjects->FileObject->Vpb )
return FLT_PREOP_SUCCESS_NO_CALLBACK;
You should consider doing most of your work during the IRP_MJ_CLEAN pre- or
post-op call, though. Create a context and check that context during
pre-read/write and deny Fast I/O at that time.
HTH,
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gene Allen
Sent: Friday, August 12, 2005 2:43 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] IRP_MJ_READ and Fast I/O
I’m written a mini-filter to watch file reads on certain files reads by
using a pre-operation routine on IRP_MJ_READ. It works great with some
programs like notepad, but some programs like MSWord seem to use Fast I/O,
bypassing my IRP_MJ_READ routine.
I was considering trying to deny fast i/o to the doc file that I want to
watch by using an IRP_MJ_FAST_IO_CHECK_IF_POSSIBLE, but according to
FileMon, that IRP never happens and according to the documentation that
makes sense since it looks like the FastIoCheckIfPossible only gets called
by FastIORead and FastIOWrite, which doesn’t help me much.
Any ideas on how I can catch the reads withouth have to write ALL the Fast
I/O Dispatch routines? Can I even register Fast I/O Dispatch routines with
a minifilter?
Thanks.
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@comcast.net
To unsubscribe send a blank email to xxxxx@lists.osr.com