Using Fltxxx functions in StreamContext Cleanup routine

Hi!

I am developing a minifilter in which I have perform some work on a file (
stream ) when I receive a context cleanup for that stream context.

Can I issue Fltxxx functions in that callback?

I know that this routine can be called at IRQL < = APC_LEVEL. So I can use
only those Fltxxx routines that can be called at IRQL <= APC_LEVEL and
cannot call routines that can only be called at IRQL = PASSIVE_LEVEL.

Apart from this restriction, are there any other restrictions?

Thanks!

Ayush Gupta

Hey guys!

Got the answer!

YOU MAY OR MAY NOT PERFORM FILE OPERATION. Depending on whether the
InstanceTeardownStart has been called for the instance attached to the
volume on which the file exists.

If it has been called, the instance becomes invalid and hence you cannot
perform any file i/o.

However, you can use FltReleaseInstanceContext ( just in case you had stored
the Instance Context in your Stream Context ).

Regards!

Ayush Gupta

K7 Computing Pvt. Ltd.

www.k7computing.com

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ayush Gupta
Sent: Sunday, August 05, 2007 8:24 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Using Fltxxx functions in StreamContext Cleanup routine

Hi!

I am developing a minifilter in which I have perform some work on a file (
stream ) when I receive a context cleanup for that stream context.

Can I issue Fltxxx functions in that callback?

I know that this routine can be called at IRQL < = APC_LEVEL. So I can use
only those Fltxxx routines that can be called at IRQL <= APC_LEVEL and
cannot call routines that can only be called at IRQL = PASSIVE_LEVEL.

Apart from this restriction, are there any other restrictions?

Thanks!

Ayush Gupta


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

It seems that we cannot make such calls ( that require instance parameter )
in the StreamContext cleanup routine. And it has nothing to do with
InstanceTeardownStart.

I am getting an error when I switch on Driver Verifier on a Checked build
Windows XP.

Its giving an error saying that Invalid Instance Object was used.

Why is it happening?

Regards!

Ayush Gupta

K7 Computing Pvt. Ltd.

www.k7computing.com

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ayush Gupta
Sent: Monday, August 06, 2007 1:07 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Using Fltxxx functions in StreamContext Cleanup routine

Hey guys!

Got the answer!

YOU MAY OR MAY NOT PERFORM FILE OPERATION. Depending on whether the
InstanceTeardownStart has been called for the instance attached to the
volume on which the file exists.

If it has been called, the instance becomes invalid and hence you cannot
perform any file i/o.

However, you can use FltReleaseInstanceContext ( just in case you had stored
the Instance Context in your Stream Context ).

Regards!

Ayush Gupta

K7 Computing Pvt. Ltd.

www.k7computing.com

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ayush Gupta
Sent: Sunday, August 05, 2007 8:24 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Using Fltxxx functions in StreamContext Cleanup routine

Hi!

I am developing a minifilter in which I have perform some work on a file (
stream ) when I receive a context cleanup for that stream context.

Can I issue Fltxxx functions in that callback?

I know that this routine can be called at IRQL < = APC_LEVEL. So I can use
only those Fltxxx routines that can be called at IRQL <= APC_LEVEL and
cannot call routines that can only be called at IRQL = PASSIVE_LEVEL.

Apart from this restriction, are there any other restrictions?

Thanks!

Ayush Gupta


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Sorry for the confusion…

We can make such calls.

I was not passing the correct instance object.

Regards!

Ayush Gupta

K7 Computing Pvt. Ltd.

www.k7computing.com

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ayush Gupta
Sent: Monday, August 06, 2007 9:55 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Using Fltxxx functions in StreamContext Cleanup routine

It seems that we cannot make such calls ( that require instance parameter )
in the StreamContext cleanup routine. And it has nothing to do with
InstanceTeardownStart.

I am getting an error when I switch on Driver Verifier on a Checked build
Windows XP.

Its giving an error saying that Invalid Instance Object was used.

Why is it happening?

Regards!

Ayush Gupta

K7 Computing Pvt. Ltd.

www.k7computing.com

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ayush Gupta
Sent: Monday, August 06, 2007 1:07 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Using Fltxxx functions in StreamContext Cleanup routine

Hey guys!

Got the answer!

YOU MAY OR MAY NOT PERFORM FILE OPERATION. Depending on whether the
InstanceTeardownStart has been called for the instance attached to the
volume on which the file exists.

If it has been called, the instance becomes invalid and hence you cannot
perform any file i/o.

However, you can use FltReleaseInstanceContext ( just in case you had stored
the Instance Context in your Stream Context ).

Regards!

Ayush Gupta

K7 Computing Pvt. Ltd.

www.k7computing.com

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ayush Gupta
Sent: Sunday, August 05, 2007 8:24 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Using Fltxxx functions in StreamContext Cleanup routine

Hi!

I am developing a minifilter in which I have perform some work on a file (
stream ) when I receive a context cleanup for that stream context.

Can I issue Fltxxx functions in that callback?

I know that this routine can be called at IRQL < = APC_LEVEL. So I can use
only those Fltxxx routines that can be called at IRQL <= APC_LEVEL and
cannot call routines that can only be called at IRQL = PASSIVE_LEVEL.

Apart from this restriction, are there any other restrictions?

Thanks!

Ayush Gupta


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com