Zwxxx functions in dispatch routine.

Hi developers.

sorry for my foolish question.

now I make a filesystem filter driver based on SFLITER Sample.
I want to use like following and coded.
but meet with BSOD occasionally (some times OK, some times BSOD).
what’s wrong with that code…?
if you know this fact, please help me.

IRP_MJ_READ_Dispatch_Routine()
{
//
// if IRP is not for my volume, skip.
// if IRP is for my volume, read other volumes’s data.

ZwOpenFile(other_volume’s_file);
ZwReadFile(other_file_handle);
ZwCloseFile(other_file_handle);

}

thank you for concern.
have a nice day.

p.s.
sorry for my poor English.


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

Have you look for IRQL?

The Zw… functions must work at PASSIVE_LEVEL.

-Abel.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@softonnet.com
Sent: viernes, 06 de abril de 2001 0:00
To: File Systems Developers
Subject: [ntfsd] Zwxxx functions in dispatch routine.

Hi developers.

sorry for my foolish question.

now I make a filesystem filter driver based on SFLITER Sample.
I want to use like following and coded.
but meet with BSOD occasionally (some times OK, some times BSOD).
what’s wrong with that code…?
if you know this fact, please help me.

IRP_MJ_READ_Dispatch_Routine()
{
//
// if IRP is not for my volume, skip.
// if IRP is for my volume, read other volumes’s data.

ZwOpenFile(other_volume’s_file);
ZwReadFile(other_file_handle);
ZwCloseFile(other_file_handle);

}

thank you for concern.
have a nice day.

p.s.
sorry for my poor English.


You are currently subscribed to ntfsd as: xxxxx@trymedia.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


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

Thank you for reply Abel.

.
.

I resolved problem by using KeLowerIrql() and KeRaiseIrql() function.

have a nice day~

^_^;


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

Hmmmmm, this can be useful, but only for some debug purposes,
not for real application. I thing you should meditate
to find out if there is a better solution.

Maybe I can help you, but you must tell me the background
for the need of calling file ZwXxxx in FSD dispatch routine.

Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@softonnet.com
Sent: Friday, April 06, 2001 9:25 AM
To: File Systems Developers
Subject: [ntfsd] RE: Zwxxx functions in dispatch routine.

Thank you for reply Abel.

.
.

I resolved problem by using KeLowerIrql() and KeRaiseIrql() function.

have a nice day~

^_^;


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


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

RE: [ntfsd] RE: Zwxxx functions in dispatch routine.Have you think about
create a WorkItem?

ExInitializeWorkItem();
ExQueueWorkItem();

-Abel
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Hrdina Pavel
Sent: viernes, 06 de abril de 2001 16:52
To: File Systems Developers
Subject: [ntfsd] RE: Zwxxx functions in dispatch routine.

Hmmmmm, this can be useful, but only for some debug purposes,
not for real application. I thing you should meditate
to find out if there is a better solution.

Maybe I can help you, but you must tell me the background
for the need of calling file ZwXxxx in FSD dispatch routine.

Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@softonnet.com
Sent: Friday, April 06, 2001 9:25 AM
To: File Systems Developers
Subject: [ntfsd] RE: Zwxxx functions in dispatch routine.

Thank you for reply Abel.

.
.

I resolved problem by using KeLowerIrql() and KeRaiseIrql() function.

have a nice day~

^_^;


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@trymedia.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


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

Maybe.
This?is even more better than previous because you can safely wait
at Irql <= APC_LEVEL and?your dispatch routine should not be called
at Irql > APC_LEVEL. But file ZwXxxx routines uses normal I/O completion
which sometimes uses APCs, so when you’re at APC level, you’re in
trouble.
Thus?the better solution is to queue a work item which really does the
work
(at PASSIVE_LEVEL of course) and wait in the original thread until the
work
is completed by the work item.
?
Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Abel Mu?oz Alcaraz
Sent: Friday, April 06, 2001 5:27 PM
To: File Systems Developers
Subject: [ntfsd] RE: Zwxxx functions in dispatch routine.

Have you think about create a WorkItem?
?
??? ExInitializeWorkItem();
??? ExQueueWorkItem();

-Abel

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Hrdina Pavel
Sent: viernes, 06 de abril de 2001 16:52
To: File Systems Developers
Subject: [ntfsd] RE: Zwxxx functions in dispatch routine.

Hmmmmm, this can be useful, but only for some debug purposes,
not for real application. I thing you should meditate
to find out if there is a better solution.

Maybe I can help you, but you must tell me the background
for the need of calling file ZwXxxx in FSD dispatch routine.

Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of
xxxxx@softonnet.com
Sent: Friday, April 06, 2001 9:25 AM
To: File Systems Developers
Subject: [ntfsd] RE: Zwxxx functions in dispatch routine.

Thank you for reply Abel.

.
.

I resolved problem by using KeLowerIrql() and KeRaiseIrql() function.

have a nice day~

^_^;


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@trymedia.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@compelson.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


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

thank you for quick response. Abel, Paul.

your reply is a great help to me.

I am deeply grateful to you for your kindness.

have a nice day.

^_^;


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