Hi,
I wrote a file system filter driver for NTFS and hooked on the read and
write operations (IRP_MJ_READ & IRP_MJ_WRITE). During these operations, I
want to know whether the request is for file or dir. I queried the lower
file system to find out the attribute by sending an IRP. It works fine
initially, however, the system hangs after a while. I couldn’t get the reply
from the lower file system about the IRP query. I used similar code from
filemon which query the filename from lower file system.
-
Can I block in read and write operations to query the lower file system
for the attribute?
What is the possible reason that caused the system hangs? -
Is there a simple way to get the file attribute in the read and write
operations without querying the lower file system?
I tried another approach in IRP_MJ_CREATE. After IRP_MJ_CREATE successfully
completed in dispatch routine, I send the query IRP to get the file
attribute of the File Object. Then I stored the File Object and attribute in
the memory, so that I can look up its attribute based on the File Object in
the read and write operations. However, I notice that some File Objects do
not appear in the IRP_MJ_CREATE call, especially the creation of temporary
file and some dirs open. So I am not able to do the lookup successfully.
- I thought the File Object is created only in the IRP_MJ_CREATE routine,
so all other IRPs (including IRP_MJ_READ and IRP_MJ_WRITE) use these File
Objects created in the create call. Am I right?
Thank you for any information!
Regards,
Sin Lam
xxxxx@krdl.org.sg
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