STATUS_FILE_CLOSED returned during IRP_MJ_WRITE

Hi all,
I’m trying to roll my own IRP_MJ_READ during IRP_MJ_WRITE dispatch received in my file system filter driver for encryption.
From my IRP_MJ_READ completion routine I receive STATUS_FILE_CLOSED error and after that I receive bug check PFN_LIST_CORRUPT
P1 = 7
P2 = 1487
P3= 1
P4 = 0
Parameter 1
Check Key =7
Any help will be appreciated.
Stefan

You are not handling the MDL correctly. Are you using non-paged pool? If
so, did you use MmBuildMdlForNonPagedPool instead of MmProbeAndLockPages (or
vice-versa)?

This problem normally occurs because the reference count (or share count) is
wrong on the page in the PFN database (and this normally happens because
drivers do not handle the MDL properly).

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: Stefan Boboc [mailto:SBoboc@ps.ro]
Sent: Friday, August 16, 2002 11:04 AM
To: File Systems Developers
Subject: [ntfsd] STATUS_FILE_CLOSED returned during IRP_MJ_WRITE

Hi all,
I’m trying to roll my own IRP_MJ_READ during IRP_MJ_WRITE dispatch received
in my file system filter driver for encryption.
From my IRP_MJ_READ completion routine I receive STATUS_FILE_CLOSED error
and after that I receive bug check PFN_LIST_CORRUPT
P1 = 7
P2 = 1487
P3= 1
P4 = 0
Parameter 1
Check Key =7
Any help will be appreciated.
Stefan


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to %%email.unsub%%

Stefan,

In adition to Tony’s advice, if you are processing a paging IO write
request, you should read
from the target file through a paging IO as well, and not through a normal
read. Paging IO is
valid for files which has been already cleaned-up (fs received
IRP_MJ_CLEANUP, HandleCount == 0), in which case normal file IO is no longer
allowed.

Dan

----- Original Message -----
From: “Stefan Boboc”
To: “File Systems Developers”
Sent: Friday, August 16, 2002 6:03 PM
Subject: [ntfsd] STATUS_FILE_CLOSED returned during IRP_MJ_WRITE

Hi all,
I’m trying to roll my own IRP_MJ_READ during IRP_MJ_WRITE dispatch received
in my file system filter driver for encryption.
From my IRP_MJ_READ completion routine I receive STATUS_FILE_CLOSED error
and after that I receive bug check PFN_LIST_CORRUPT
P1 = 7
P2 = 1487
P3= 1
P4 = 0
Parameter 1
Check Key =7
Any help will be appreciated.
Stefan


You are currently subscribed to ntfsd as: xxxxx@rdsor.ro
To unsubscribe send a blank email to %%email.unsub%%