Hi , all:
I know the major function IRP_MJ_READ / IRP_MJ_WRITE request will be
trnasformed into IRP_MJ_SCSI function. I would like to add “read ahead
mechanism”
in form of the ClassPnP lower filter driver. It is used with
METHOD_DIRECT_IO in
this layer and I supposed the return data should be carried at
IRP->MdlAddress.
How could I do ?
I supposed I sould allocate a buffer (maybe in the driver extension)
and call
IoAllocateMdl( &mybuf, sizeof(mybuf), FALSE, FALSE, NULL) to get the newMDL.
Replace the original MDL ( Irp->MdlAddress) with newMDL and
Srb->DataTransferLengh.
Then set the IRP Completion routine to do things like memory moving while
IRP been
processed. But it is working !! Any suggestion ?
Thanks.
Best Regards.
David Wang
Windows has a cache manager that has its own read ahead policies. Its good
to let the cache manager do its work and not change the behaviour of the
storage stack any further.
–
Nar Ganapathy
Windows Core OS group
This posting is provided “AS IS” with no warranties, and confers no rights.
“§»»Ê” wrote in message news:xxxxx@ntdev…
>
> Hi , all:
>
> I know the major function IRP_MJ_READ / IRP_MJ_WRITE request will be
> trnasformed into IRP_MJ_SCSI function. I would like to add “read ahead
> mechanism”
> in form of the ClassPnP lower filter driver. It is used with
> METHOD_DIRECT_IO in
> this layer and I supposed the return data should be carried at
> IRP->MdlAddress.
> How could I do ?
>
> I supposed I sould allocate a buffer (maybe in the driver extension)
> and call
> IoAllocateMdl( &mybuf, sizeof(mybuf), FALSE, FALSE, NULL) to get the
newMDL.
> Replace the original MDL ( Irp->MdlAddress) with newMDL and
> Srb->DataTransferLengh.
> Then set the IRP Completion routine to do things like memory moving while
> IRP been
> processed. But it is working !! Any suggestion ?
>
> Thanks.
>
> Best Regards.
>
> David Wang
>
>
>
>