STATUS_IO_PENDING in File System Filter

Hello Everyone,

I have a file system filter driver that intercepts file open/close
operations. Well i need to performance some work on the file data once
a file is accessed. This work is performed in a user mode application.

The general model i follow is depicted below

User/System file system User Mode
filter process
Signal Event
File Operation ------> Dispatch -------> opens file …
(Open R+ etc) (Block perform work …
(Blocked) for return Closes file …
Event)
Signal Event
<-------
(Unblock)
Perform
original file
operation
Pass IRP up
the stack with
Ret Code
<-------
(Unblocked)

Now the problem i face is that under intense file system activity
(Network access, Lots of files being opened , same file being opened by
mutiple threads etc … i start getting STATUS_IO_PENDING in increasing
amounts and finally the system freezes.

In fact even if i perform NO WORK in the user mode side … just a
single open / close operation the system freezes even then under
activity.

Any hints about how to tackle the core of this issue ? Is the model of
performing work on the user mode side robust enough in high access
senarios ?

Thanks in advance for your help.

Regards

  • Vikrant

NTFSD alias is probably a better forum for this question.
Anyway - if you block the creates, and wait for user-mode to signal you

  • are you handling the potential infinite recursion case when the
    user-mode process opens the file, you bounce back the create right back
    to the user-mode process again from the filter driver?

Secondly - it sounds like you are blocking the create on the way up, to
go to user-mode.
SRV.SYS (NT file server) issues creates with FILE_COMPLETE_IF_OPLOCKED
set to indicate the create should be non-blocking. If you end up
blocking there, it would tie up SRV threads, and that can be really bad.
Ravi

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@yahoo.com [mailto:xxxxx@yahoo.com]
Sent: Monday, July 22, 2002 3:21 AM
To: NT Developers Interest List
Subject: [ntdev] STATUS_IO_PENDING in File System Filter

Hello Everyone,

I have a file system filter driver that intercepts file open/close
operations. Well i need to performance some work on the file data once a
file is accessed. This work is performed in a user mode application.

The general model i follow is depicted below

User/System file system User Mode
filter process
Signal Event
File Operation ------> Dispatch -------> opens file …
(Open R+ etc) (Block perform work …
(Blocked) for return Closes file …
Event)
Signal Event
<-------
(Unblock)
Perform
original file
operation
Pass IRP up
the stack with
Ret Code
<-------
(Unblocked)

Now the problem i face is that under intense file system activity
(Network access, Lots of files being opened , same file being opened by
mutiple threads etc … i start getting STATUS_IO_PENDING in increasing
amounts and finally the system freezes.

In fact even if i perform NO WORK in the user mode side … just a
single open / close operation the system freezes even then under
activity.

Any hints about how to tackle the core of this issue ? Is the model of
performing work on the user mode side robust enough in high access
senarios ?

Thanks in advance for your help.

Regards

  • Vikrant

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%

Recursion is easy to resolve. Just record the process ID of the process
that will be doing the secondary IO in user-mode. The filter can then
detect these operations and not post them to user-mode; done it may
times

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ravisankar
Pudipeddi
Sent: Monday, July 22, 2002 9:20 AM
To: NT Developers Interest List
Subject: [ntdev] RE: STATUS_IO_PENDING in File System Filter

NTFSD alias is probably a better forum for this question.
Anyway - if you block the creates, and wait for user-mode to signal you

  • are you handling the potential infinite recursion case when the
    user-mode process opens the file, you bounce back the create right back
    to the user-mode process again from the filter driver?

Secondly - it sounds like you are blocking the create on the way up, to
go to user-mode.
SRV.SYS (NT file server) issues creates with FILE_COMPLETE_IF_OPLOCKED
set to indicate the create should be non-blocking. If you end up
blocking there, it would tie up SRV threads, and that can be really bad.
Ravi

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@yahoo.com [mailto:xxxxx@yahoo.com]
Sent: Monday, July 22, 2002 3:21 AM
To: NT Developers Interest List
Subject: [ntdev] STATUS_IO_PENDING in File System Filter

Hello Everyone,

I have a file system filter driver that intercepts file open/close
operations. Well i need to performance some work on the file data once a
file is accessed. This work is performed in a user mode application.

The general model i follow is depicted below

User/System file system User Mode
filter process
Signal Event
File Operation ------> Dispatch -------> opens file …
(Open R+ etc) (Block perform work …
(Blocked) for return Closes file …
Event)
Signal Event
<-------
(Unblock)
Perform
original file
operation
Pass IRP up
the stack with
Ret Code
<-------
(Unblocked)

Now the problem i face is that under intense file system activity
(Network access, Lots of files being opened , same file being opened by
mutiple threads etc … i start getting STATUS_IO_PENDING in increasing
amounts and finally the system freezes.

In fact even if i perform NO WORK in the user mode side … just a
single open / close operation the system freezes even then under
activity.

Any hints about how to tackle the core of this issue ? Is the model of
performing work on the user mode side robust enough in high access
senarios ?

Thanks in advance for your help.

Regards

  • Vikrant

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%


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

Hi all,

Thanks for your reply. It is not a re-entrancy issue. Also I tried to
check the CREATEs with FILE_COMPLETE_IF_OPLOCKED and avoided blocking
those, but invain. The problem still persists.

Regards.