Q: Fast i/o dispatch routines never get called?

Hello,

I’m new to device driver developing so this question may not make
much sense. I’m writing a virtual disk driver. Once in a while there
are write operations which are not handled by my IRP_MJ_WRITE
dispatch routines. I suspect they are from either Fast I/O or Cache
Manage. In trying to capture them, I define the fast I/O dispatch
entrie points and Cache Manager callbacks. However, these
routines never get called. I dont know what I’m missing here.
Your help is greatly appreciated.

Chu Bun

As a disk driver, you are not interacting with the CM nor will your fast
IO routines be called, generally speaking of course. Both of these are
usually reserved for Filesystem drivers.

Of course you could have some type of hybrid implementation, but I doubt
it.

Pete

Peter Scott
xxxxx@KernelDrivers.com
www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ChuBun
Sent: Thursday, March 27, 2003 8:17 AM
To: NT Developers Interest List
Subject: [ntdev] Q: Fast i/o dispatch routines never get called?

Hello,

I’m new to device driver developing so this question may not make
much sense. I’m writing a virtual disk driver. Once in a while there
are write operations which are not handled by my IRP_MJ_WRITE
dispatch routines. I suspect they are from either Fast I/O or Cache
Manage. In trying to capture them, I define the fast I/O dispatch
entrie points and Cache Manager callbacks. However, these
routines never get called. I dont know what I’m missing here.
Your help is greatly appreciated.

Chu Bun


You are currently subscribed to ntdev as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

All block-level writes to disks will go to disk driver’s MJ_WRITE
entry point.
FastIo is for filesystems only.

Max

“ChuBun” wrote in message
news:LYRIS-11365-102347-2003.03.27-10.59.41–maxim#storagecraft.com@li
sts.osr.com
> Hello,
>
> I’m new to device driver developing so this question may not make
> much sense. I’m writing a virtual disk driver. Once in a while
there
> are write operations which are not handled by my IRP_MJ_WRITE
> dispatch routines. I suspect they are from either Fast I/O or Cache
> Manage. In trying to capture them, I define the fast I/O dispatch
> entrie points and Cache Manager callbacks. However, these
> routines never get called. I dont know what I’m missing here.
> Your help is greatly appreciated.
>
> Chu Bun
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com
>

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
>
> All block-level writes to disks will go to disk driver’s MJ_WRITE
> entry point.
> FastIo is for filesystems only.
>
> Max
>
Thank guys for your quick replies. My problem is that some write operations
do not
go to the MJ_WRITE entry point. If I make the disk read-only, there will be
STATUS_MEDIA_WRITE_PROTECTED errors reported by “MM MODWRITE”.
I guess “MODWRITE” is “Modified Page Writer” which belongs to Fast I/O, and
try
to fix this by return FALSE in my FastIoCheckIfPossible. Any suggestions
what I
should try next?

Chu Bun

Right, this is the MPW thread issuing writes, through the FSD ABOVE you.
If you are making your device read only then why would you expect to see
ANY write requests?

The FSD may simply fail these requests before it issues them to you.

Pete

Peter Scott
xxxxx@KernelDrivers.com
www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ChuBun
Sent: Friday, March 28, 2003 8:45 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Q: Fast i/o dispatch routines never get called?

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
>
> All block-level writes to disks will go to disk driver’s MJ_WRITE
> entry point.
> FastIo is for filesystems only.
>
> Max
>
Thank guys for your quick replies. My problem is that some write
operations
do not
go to the MJ_WRITE entry point. If I make the disk read-only, there
will be
STATUS_MEDIA_WRITE_PROTECTED errors reported by “MM MODWRITE”.
I guess “MODWRITE” is “Modified Page Writer” which belongs to Fast I/O,
and
try
to fix this by return FALSE in my FastIoCheckIfPossible. Any
suggestions
what I
should try next?

Chu Bun


You are currently subscribed to ntdev as: xxxxx@kerneldrivers.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I dont expect write requests but they just happen! I set
FILE_READ_ONLY_DEVICE for DeviceObject Characteristics
STATUS_MEDIA_WRITE_PROTECTED for
IOCTL_DISK_IS_WRITABLE iocontrol code.
RemovableMedia for MediaType

But something still tries to write to the disk. The write requests seem to
happen
during Query Disk Information operations. My guess is the FSD trying to
update the
last access time or something similar which will result in a write.
I’m really confused now. I thoughts FSD is the driver below me!

“Peter Scott” wrote in message
news:xxxxx@ntdev…
>
>
> Right, this is the MPW thread issuing writes, through the FSD ABOVE you.
> If you are making your device read only then why would you expect to see
> ANY write requests?
>
> The FSD may simply fail these requests before it issues them to you.
>
> Pete
>
> Peter Scott
> xxxxx@KernelDrivers.com
> www.KernelDrivers.com
>