layered driver - only receives create dispatches

My FSD is only receiving IRP_MJ_CREATE calls, not reads, writes,
cleanups, closes, etc. The only Fast I/O calls I get are for
FastIoQueryOpen.

There’s one strange thing about my FSD that’s probably behind this
problem, and I hope you guys can comment. My filesystem is virtual;
when I receive an IRP_MJ_CREATE, I preprocess the I/O request (such as
by translating a filename) and pass it on to another driver (FASTFAT or
NTFS), but I do not attach to that other driver’s device stack, so my
FSD is not a filter driver. Oh – my control device object receives
creates, cleanups, closes, etc. just fine; it’s my volume device
objects that only receive creates.

At any rate, I pass on the create I/O request to the other driver, and
then the I/O Manager no longer involves my driver in processing I/O for
that particular file (this is not the behavior that I want). The
driver that I pass the create request onto is directly handed all I/O
from then on for that file by the I/O Manager because the operations
work just fine. How do I get the I/O Manager to send future I/O
requests through my driver, which was the original target of the create
operation? I have verified with a create completion routine that the
FileObject->Device field for my IRP stack location is set to my device
object, not the one that I handed the IRP off to. Do I need to check
other IRP stack locations? I am hoping to avoid messing with another
driver’s stack location.

Thanks in advance for any help,

Derrick


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.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

Derrick:

One of the operations that FSD performs when handling IRP_MJ_CREATE is
initializing FileObject->Vpb with a pointer to this volume’s VPB (lets not
talk about redirectors for now). Then, when FileObject is initialized, I/O
Manager uses FileObject->Vpb to define which volume (and thus FSD) this file
belongs to. Vpb->DeviceObject (or RealDevice, I always forget :frowning: is the
device that points on FSD device to which all subsequent I/O should be sent.
And that’s exactly what you’re observing: FAT or NTFS actually completed
create IRP so FileObject->Vpb points on their device so I/O Manager calls
FAT or NTFS driver to handle read, write, etc.
What was my solution for that is that in my create dispatch routine I save
each FileObject in my internal table. Then I have a filter device that
monitors FAT/NTFS and for each intercepted request (including Fast I/O) I
look up request’s FileObject in my table. And if I found one - that’s mine.
May be you can “overwrite” FileObject->Vpb back, but I can’t tell the
consequences.

Regards,

Vladimir

-----Original Message-----
From: Derrick Whittle [mailto:xxxxx@yahoo.com]
Sent: Monday, July 02, 2001 5:59 PM
To: File Systems Developers
Subject: [ntfsd] layered driver - only receives create dispatches

My FSD is only receiving IRP_MJ_CREATE calls, not reads, writes,
cleanups, closes, etc. The only Fast I/O calls I get are for
FastIoQueryOpen.

There’s one strange thing about my FSD that’s probably behind this
problem, and I hope you guys can comment. My filesystem is virtual;
when I receive an IRP_MJ_CREATE, I preprocess the I/O request (such as
by translating a filename) and pass it on to another driver (FASTFAT or
NTFS), but I do not attach to that other driver’s device stack, so my
FSD is not a filter driver. Oh – my control device object receives
creates, cleanups, closes, etc. just fine; it’s my volume device
objects that only receive creates.

At any rate, I pass on the create I/O request to the other driver, and
then the I/O Manager no longer involves my driver in processing I/O for
that particular file (this is not the behavior that I want). The
driver that I pass the create request onto is directly handed all I/O
from then on for that file by the I/O Manager because the operations
work just fine. How do I get the I/O Manager to send future I/O
requests through my driver, which was the original target of the create
operation? I have verified with a create completion routine that the
FileObject->Device field for my IRP stack location is set to my device
object, not the one that I handed the IRP off to. Do I need to check
other IRP stack locations? I am hoping to avoid messing with another
driver’s stack location.

Thanks in advance for any help,

Derrick


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/


You are currently subscribed to ntfsd as: xxxxx@Starbase.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