I’m working on a file system filter, and one of its tasks is to copy a file
just prior to deletion. The filter catches the FileDispositionInformation
FileInformationClass of the IRP_MJ_SET_INFORMATION IRP.
I open the destination file with the ZwCreateFile routine, and use the
ZwWrite routine to write data into the destination file. Since the file to
be copied is already open, I roll my own IRPs to read data out of the file
using IoBuildAsynchronousFsdRequest(). I’m using a 16K non-paged buffer to
read and write the data.
When deleting a large file (5 MB), the copy routine got about 800K copied
before hitting the following bugcheck (0x4E is PFN_LIST_CORRUPT):
*** Fatal System Error: 0x0000004e
(0x00000007,0x00001BE0,0x00000001,0x00000000)
The stack looks like:
ChildEBP RetAddr Args to Child
f5436d48 8042c068 00000003 00001be0 81464d00
ntoskrnl!DbgBreakPointWithStatus+0x4
f54370d0 80449cbb 00000000 00000007 00001be0 ntoskrnl!KeBugCheckEx0x154
8129aaa4 0000015e ffffffff ffffffff ffffffff
ntoskrnl!MmTrimAllSystemPagableMemory+0x6c8a
I suspect something about the buffer that I’m using. I previously checked
the irp->MdlAddress and the AssociatedIrp->SystemBuffer addresses in the IRP
created by IoBuildAsynchronousFsdRequest and they were NULL. I concluded
(perhaps incorrectly) that since I was using a non-paged buffer, it was fine
for these addresses to be NULL. Does anyone have any ideas about what I
might be doing incorrectly?
Brad
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