Disk Lower filter help

Hi All,
I am new to the disk lower filters and port drivers. I need to trap the
read and write requests below the disk.sys driver layer. I am using diskperf
sample. While attaching diskperf as upper filter I can trap all reads and
writes. This is not the case when I attach it as lower filter.
Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE
requests below disk.sys? What changes I need to add to diskperf so that I
can trap the read and write requests while attaching filter below disk.sys?
I can’t find any documents regarding the disk lower filters or port
upper filter in the ddk. Can anybody suggest me good documents for the same?

Thanks in advance,
Giri.

Hi,

you won’t see IRP_MJ_READ/WRITE below disk.sys, on that level
SCSI_REQUEST_BLOCKs are used.
Disk/classpnp sources are part of the DDK, so you can see what happens to
IRP_MJ_READ/WRITE.

Regards
Else

“giri jangam”
To: “Windows System Software Devs Interest List”
Sent by: cc:
bounce-292618-16691@li Subject: [ntdev] Disk Lower filter help
sts.osr.com

07/05/2007 08:52 AM
Please respond to
“Windows System
Software Devs Interest
List”

Hi All,
I am new to the disk lower filters and port drivers. I need to trap the
read and write requests below the disk.sys driver layer. I am using
diskperf sample. While attaching diskperf as upper filter I can trap all
reads and writes. This is not the case when I attach it as lower filter.
Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE
requests below disk.sys? What changes I need to add to diskperf so that I
can trap the read and write requests while attaching filter below disk.sys
?
I can’t find any documents regarding the disk lower filters or port
upper filter in the ddk. Can anybody suggest me good documents for the
same?

Thanks in advance,
Giri.

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> Disk/classpnp sources are part of the DDK, so you can see what happens to

IRP_MJ_READ/WRITE.
To the OP: just use earlier version of DDK/WDK than 6000.
classpnp from 6000 is longhorn-only (it uses IoCallDriverStackSafe[Default]).

Even in w2k3 build env you get

BUILD: Linking c:\winddk\6000\src\storage\class\classpnp directory
Warning : The sample “c:\winddk\6000\src\storage\class\classpnp” is not
valid for the current OS target.

IIRC how things were done in previous versions, was rewritten.

My guess is that version 3790 would be ok.

-------------- Original message --------------
From: Else Kluger

> Hi,
>
> you won’t see IRP_MJ_READ/WRITE below disk.sys, on that level
> SCSI_REQUEST_BLOCKs are used.
> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
>
> Regards
> Else
>
>
>
>
> “giri jangam”
> To: “Windows System
> Software Devs Interest List”
> Sent by: cc:
> bounce-292618-16691@li Subject: [ntdev] Disk Lower
> filter help
> sts.osr.com
>
>
> 07/05/2007 08:52 AM
> Please respond to
> “Windows System
> Software Devs Interest
> List”
>
>
>
>
>
> Hi All,
> I am new to the disk lower filters and port drivers. I need to trap the
> read and write requests below the disk.sys driver layer. I am using
> diskperf sample. While attaching diskperf as upper filter I can trap all
> reads and writes. This is not the case when I attach it as lower filter.
> Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE
> requests below disk.sys? What changes I need to add to diskperf so that I
> can trap the read and write requests while attaching filter below disk.sys
> ?
> I can’t find any documents regarding the disk lower filters or port
> upper filter in the ddk. Can anybody suggest me good documents for the
> same?
>
> Thanks in advance,
> Giri.
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

No version of classpnp that I am aware of sends IRP_MJ_READ/IRP_MJ_WRITE
down the stack. As noted by a previous poster, IRP_MJ_SCSI is what his
lower filter driver should be looking for. The details of how classpnp
does the conversion from read/write to srb may change, but that is not
the OP’s current problem.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@comcast.net
Sent: Thursday, July 05, 2007 9:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk Lower filter help

Disk/classpnp sources are part of the DDK, so you can see what happens
to
IRP_MJ_READ/WRITE.
To the OP: just use earlier version of DDK/WDK than 6000.

classpnp from 6000 is longhorn-only (it uses
IoCallDriverStackSafe[Default]).

Even in w2k3 build env you get

BUILD: Linking c:\winddk\6000\src\storage\class\classpnp directory
Warning : The sample “c:\winddk\6000\src\storage\class\classpnp” is not

valid for the current OS target.

IIRC how things were done in previous versions, was rewritten.

My guess is that version 3790 would be ok.

-------------- Original message --------------
From: Else Kluger

> Hi,
>
> you won’t see IRP_MJ_READ/WRITE below disk.sys, on that level
> SCSI_REQUEST_BLOCKs are used.
> Disk/classpnp sources are part of the DDK, so you can see what
happens to
> IRP_MJ_READ/WRITE.
>
> Regards
> Else
>
>
>
>
> “giri jangam”
> To: “Windows System
> Software Devs Interest List”
> Sent by: cc:
> bounce-292618-16691@li Subject: [ntdev] Disk Lower
> filter help
> sts.osr.com
>
>
> 07/05/2007 08:52 AM
> Please respond to
> “Windows System
> Software Devs Interest
> List”
>
>
>
>
>
> Hi All,
> I am n! ew to t he disk lower filters and port drivers. I need
to trap the
> read and write requests below the disk.sys driver layer. I am
using
> diskperf sample. While attaching diskperf as upper filter I
can trap all
> reads and writes. This is not the case when I attach it as
lower filter.
> Can anybody tell me what happens to IRP_MJ_READ and
IRP_MJ_WRITE
> requests below disk.sys? What changes I need to add to
diskperf so that I
> can trap the read and write requests while attaching filter
below disk.sys
> ?
> I can’t find any documents regarding the disk lower filters or
port
> upper filter in the ddk. Can anybody suggest me good documents
for the
> same?
>
> Thanks in advance,
> Giri.
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe,
visit the List
> Server section of OSR Online at
> http://ww! w.osron line.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at

> http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> The details of how classpnp does the conversion from read/write to

srb may change, but that is not the OP’s current problem
What I think Else meant when she mentioned classpnp: there used to
be a loop of SRBs generated in response to read and write requests.

Not 100% sure, I traced disk+classpnp in its w2k incarnation quite a while ago.

Now this transformation is hidden.

To see how it actually may happen - not to mention just being able to compile/link

  • one has to go 1 or 2 versions back.

In this sense it is the OP’s problem.

-------------- Original message --------------
From: “Roddy, Mark”

No version of classpnp that I am aware of sends IRP_MJ_READ/IRP_MJ_WRITE down the stack. As noted by a previous poster, IRP_MJ_SCSI is what his lower filter driver should be looking for. The details of how classpnp does the conversion from read/write to srb may change, but that is not the OP’s current problem.

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@comcast.net
Sent: Thursday, July 05, 2007 9:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk Lower filter help

> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
To the OP: just use earlier version of DDK/WDK than 6000.
classpnp from 6000 is longhorn-only (it uses IoCallDriverStackSafe[Default]).

Even in w2k3 build env you get

BUILD: Linking c:\winddk\6000\src\storage\class\classpnp directory
Warning : The sample “c:\winddk\6000\src\storage\class\classpnp” is not
valid for the current OS target.

IIRC how things were done in previous versions, was rewritten.

My guess is that version 3790 would be ok.

-------------- Original message --------------
From: Else Kluger

> Hi,
>
> you won’t see IRP_MJ_READ/WRITE below disk.sys, on that level
> SCSI_REQUEST_BLOCKs are used.
> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
>
> Regards
> Else
>
>
>
>
> “giri jangam”
> To: “Windows System
> Software Devs Interest List”
> Sent by: cc:
> bounce-292618-16691@li Subject: [ntdev] Disk Lower
> filter help
> sts.osr.com
>
>
> 07/05/2007 08:52 AM
> Please respond to
> “Windows System
> Software Devs Interest
> List”
>
>
>
>
>
> Hi All,
> I am n! ew to t he disk lower filters and port drivers. I need to trap the
> read and write requests below the disk.sys driver layer. I am using
> diskperf sample. While attaching diskperf as upper filter I can trap all
> reads and writes. This is not the case when I attach it as lower filter.
> Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE
> requests below disk.sys? What changes I need to add to diskperf so that I
> can trap the read and write requests while attaching filter below disk.sys
> ?
> I can’t find any documents regarding the disk lower filters or port
> upper filter in the ddk. Can anybody suggest me good documents for the
> same?
>
> Thanks in advance,
> Giri.
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://ww! w.osron line.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi All,
thanks for their help. I finally able to trap the IRP_MJ_SCSI and from
that the SRB repersenting read and write requests. Still I have one
question, where can find the details how classpnp converts IRP to SRB? Are
there any documents I should look for? Please help with this.

Thanks,
Giri.

On 7/5/07, xxxxx@comcast.net wrote:
>
> > The details of how classpnp does the conversion from read/write to
> > srb may change, but that is not the OP’s current problem
> What I think Else meant when she mentioned classpnp: there used to
> be a loop of SRBs generated in response to read and write requests.
>
> Not 100% sure, I traced disk+classpnp in its w2k incarnation quite a while
> ago.
>
> Now this transformation is hidden.
>
> To see how it actually may happen - not to mention just being able to
> compile/link
> - one has to go 1 or 2 versions back.
>
> In this sense it is the OP’s problem.
>
>
>
>
> -------------- Original message --------------
> From: “Roddy, Mark”
>
> No version of classpnp that I am aware of sends IRP_MJ_READ/IRP_MJ_WRITE
> down the stack. As noted by a previous poster, IRP_MJ_SCSI is what his lower
> filter driver should be looking for. The details of how classpnp does the
> conversion from read/write to srb may change, but that is not the OP’s
> current problem.
>
>
> ------------------------------
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] *On Behalf Of *xxxxx@comcast.net
> Sent: Thursday, July 05, 2007 9:40 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Disk Lower filter help
>
>
>
> > Disk/classpnp sources are part of the DDK, so you can see what happens
> to
> > IRP_MJ_READ/WRITE.
> To the OP: just use earlier version of DDK/WDK than 6000.
>
> classpnp from 6000 is longhorn-only (it uses
> IoCallDriverStackSafe[Default]).
>
>
>
> Even in w2k3 build env you get
>
>
>
> BUILD: Linking c:\winddk\6000\src\storage\class\classpnp directory
> Warning : The sample “c:\winddk\6000\src\storage\class\classpnp” is not
>
> valid for the current OS target.
>
>
>
> IIRC how things were done in previous versions, was rewritten.
>
>
>
> My guess is that version 3790 would be ok.
>
>
>
>
>
>
>
> -------------- Original message --------------
> From: Else Kluger
>
> > Hi,
> >
> > you won’t see IRP_MJ_READ/WRITE below disk.sys, on that level
> > SCSI_REQUEST_BLOCKs are used.
> > Disk/classpnp sources are part of the DDK, so you can see what happens
> to
> > IRP_MJ_READ/WRITE.
> >
> > Regards
> > Else
> >
> >
> >
> >
> > “giri jangam”
> > To: “Windows System
> > Software Devs Interest List”
> > Sent by: cc:
> > bounce-292618-16691@li Subject: [ntdev] Disk Lower
> > filter help
> > sts.osr.com
> >
> >
> > 07/05/2007 08:52 AM
> > Please respond to
> > “Windows System
> > Software Devs Interest
> > List”
> >
> >
> >
> >
> >
> > Hi All,
> > I am n! ew to t he disk lower filters and port drivers. I need to trap
> the
> > read and write requests below the disk.sys driver layer. I am using
> > diskperf sample. While attaching diskperf as upper filter I can trap all
>
> > reads and writes. This is not the case when I attach it as lower filter.
>
> > Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE
> > requests below disk.sys? What changes I need to add to diskperf so that
> I
> > can trap the read and write requests while attaching filter below
> disk.sys
> > ?
> > I can’t find any documents regarding the disk lower filters or port
> > upper filter in the ddk. Can anybody suggest me good documents for the
> > same?
> >
> > Thanks in advance,
> > Giri.
> >
> > — Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
> List
> > Server section of OSR Online at
> > http://ww! w.osr on line.com/page.cfm?name=ListServer
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Use the source. It is in the WDK and DDK and has been for many years.


David J. Craig
Engineer, Sr. Staff Software Systems
Broadcom Corporation

“giri jangam” wrote in message news:xxxxx@ntdev…
Hi All,
thanks for their help. I finally able to trap the IRP_MJ_SCSI and from that the SRB repersenting read and write requests. Still I have one question, where can find the details how classpnp converts IRP to SRB? Are there any documents I should look for? Please help with this.

Thanks,
Giri.

On 7/5/07, xxxxx@comcast.net wrote:
> The details of how classpnp does the conversion from read/write to
> srb may change, but that is not the OP’s current problem
What I think Else meant when she mentioned classpnp: there used to
be a loop of SRBs generated in response to read and write requests.

Not 100% sure, I traced disk+classpnp in its w2k incarnation quite a while ago.

Now this transformation is hidden.

To see how it actually may happen - not to mention just being able to compile/link
- one has to go 1 or 2 versions back.

In this sense it is the OP’s problem.

-------------- Original message --------------
From: “Roddy, Mark” < xxxxx@stratus.com>

No version of classpnp that I am aware of sends IRP_MJ_READ/IRP_MJ_WRITE down the stack. As noted by a previous poster, IRP_MJ_SCSI is what his lower filter driver should be looking for. The details of how classpnp does the conversion from read/write to srb may change, but that is not the OP’s current problem.

--------------------------------------------------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@comcast.net
Sent: Thursday, July 05, 2007 9:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk Lower filter help

> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
To the OP: just use earlier version of DDK/WDK than 6000.

classpnp from 6000 is longhorn-only (it uses IoCallDriverStackSafe[Default]).

Even in w2k3 build env you get

BUILD: Linking c:\winddk\6000\src\storage\class\classpnp directory
Warning : The sample “c:\winddk\6000\src\storage\class\classpnp” is not

valid for the current OS target.

IIRC how things were done in previous versions, was rewritten.

My guess is that version 3790 would be ok.

-------------- Original message --------------
From: Else Kluger < xxxxx@utimaco.de>

> Hi,
>
> you won’t see IRP_MJ_READ/WRITE below disk.sys, on that level
> SCSI_REQUEST_BLOCKs are used.
> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
>
> Regards
> Else
>
>
>
>
> “giri jangam”
> To: “Windows System
> Software Devs Interest List”
> Sent by: cc:
> bounce-292618-16691@li Subject: [ntdev] Disk Lower
> filter help
> sts.osr.com
>
>
> 07/05/2007 08:52 AM
> Please respond to
> “Windows System
> Software Devs Interest
> List”
>
>
>
>
>
> Hi All,
> I am n! ew to t he disk lower filters and port drivers. I need to trap the
> read and write requests below the disk.sys driver layer. I am using
> diskperf sample. While attaching diskperf as upper filter I can trap all
> reads and writes. This is not the case when I attach it as lower filter.
> Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE
> requests below disk.sys? What changes I need to add to diskperf so that I
> can trap the read and write requests while attaching filter below disk.sys
> ?
> I can’t find any documents regarding the disk lower filters or port
> upper filter in the ddk. Can anybody suggest me good documents for the
> same?
>
> Thanks in advance,
> Giri.
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at

> http://ww! w.osr on line.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> where can find the details how classpnp converts IRP to SRB?
You may want to look at SetupReadWriteTransferPacket
in C:\WinDDK\6000\src\storage\class\classpnp\xferpkt.c
(my bad, it’s only slightly different from its 3790 version, you don’t
need 3790 DDK).

-------------- Original message --------------
From: “giri jangam”
Hi All,
thanks for their help. I finally able to trap the IRP_MJ_SCSI and from that the SRB repersenting read and write requests. Still I have one question, where can find the details how classpnp converts IRP to SRB? Are there any documents I should look for? Please help with this.

Thanks,
Giri.

On 7/5/07, xxxxx@comcast.net wrote:
> The details of how classpnp does the conversion from read/write to
> srb may change, but that is not the OP’s current problem
What I think Else meant when she mentioned classpnp: there used to
be a loop of SRBs generated in response to read and write requests.

Not 100% sure, I traced disk+classpnp in its w2k incarnation quite a while ago.

Now this transformation is hidden.

To see how it actually may happen - not to mention just being able to compile/link
- one has to go 1 or 2 versions back.

In this sense it is the OP’s problem.

-------------- Original message --------------
From: “Roddy, Mark” < xxxxx@stratus.com>

No version of classpnp that I am aware of sends IRP_MJ_READ/IRP_MJ_WRITE down the stack. As noted by a previous poster, IRP_MJ_SCSI is what his lower filter driver should be looking for. The details of how classpnp does the conversion from read/write to srb may change, but that is not the OP’s current problem.

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@comcast.net
Sent: Thursday, July 05, 2007 9:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk Lower filter help

> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
To the OP: just use earlier version of DDK/WDK than 6000.
classpnp from 6000 is longhorn-only (it uses IoCallDriverStackSafe[Default]).

Even in w2k3 build env you get

BUILD: Linking c:\winddk\6000\src\storage\class\classpnp directory
Warning : The sample “c:\winddk\6000\src\storage\class\classpnp” is not
valid for the current OS target.

IIRC how things were done in previous versions, was rewritten.

My guess is that version 3790 would be ok.

-------------- Original message --------------
From: Else Kluger < xxxxx@utimaco.de>

> Hi,
>
> you won’t see IRP_MJ_READ/WRITE below disk.sys, on that level
> SCSI_REQUEST_BLOCKs are used.
> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
>
> Regards
> Else
>
>
>
>
> “giri jangam”
> To: “Windows System
> Software Devs Interest List”
> Sent by: cc:
> bounce-292618-16691@li Subject: [ntdev] Disk Lower
> filter help
> sts.osr.com
>
>
> 07/05/2007 08:52 AM
> Please respond to
> “Windows System
> Software Devs Interest
> List”
>
>
>
>
>
> Hi All,
> I am n! ew to t he disk lower filters and port drivers. I need to trap the
> read and write requests below the disk.sys driver layer. I am using
> diskperf sample. While attaching diskperf as upper filter I can trap all
> reads and writes. This is not the case when I attach it as lower filter.
> Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE
> requests below disk.sys? What changes I need to add to diskperf so that I
> can trap the read and write requests while attaching filter below disk.sys
> ?
> I can’t find any documents regarding the disk lower filters or port
> upper filter in the ddk. Can anybody suggest me good documents for the
> same?
>
> Thanks in advance,
> Giri.
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at

> http://ww! w.osr on line.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Why do you care how disk.sys converts read requests into srbs? What do you
hope to accomplish by incorporating the internal knowledge of disk/classpnp
read/write to srb transformations into your lower filter driver?

What you end up with in your filter driver is an SRB describing a SCSI read
or write request with a specific LBA and length, and a data buffer described
as an MDL that contains the data payload for that read or write SCSI
request.

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of giri jangam
Sent: Friday, July 06, 2007 1:56 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk Lower filter help

Hi All,
thanks for their help. I finally able to trap the IRP_MJ_SCSI and from
that the SRB repersenting read and write requests. Still I have one
question, where can find the details how classpnp converts IRP to SRB? Are
there any documents I should look for? Please help with this.

Thanks,
Giri.

On 7/5/07, xxxxx@comcast.net mailto:xxxxx > wrote:

> The details of how classpnp does the conversion from read/write to

> srb may change, but that is not the OP’s current problem

What I think Else meant when she mentioned classpnp: there used to

be a loop of SRBs generated in response to read and write requests.

Not 100% sure, I traced disk+classpnp in its w2k incarnation quite a while
ago.

Now this transformation is hidden.

To see how it actually may happen - not to mention just being able to
compile/link

- one has to go 1 or 2 versions back.

In this sense it is the OP’s problem.

-------------- Original message --------------
From: “Roddy, Mark” < xxxxx@stratus.com>

No version of classpnp that I am aware of sends IRP_MJ_READ/IRP_MJ_WRITE
down the stack. As noted by a previous poster, IRP_MJ_SCSI is what his lower
filter driver should be looking for. The details of how classpnp does the
conversion from read/write to srb may change, but that is not the OP’s
current problem.

_____

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@comcast.net
Sent: Thursday, July 05, 2007 9:40 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk Lower filter help

> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
To the OP: just use earlier version of DDK/WDK than 6000.

classpnp from 6000 is longhorn-only (it uses
IoCallDriverStackSafe[Default]).

Even in w2k3 build env you get

BUILD: Linking c:\winddk\6000\src\storage\class\classpnp directory
Warning : The sample “c:\winddk\6000\src\storage\class\classpnp” is not

valid for the current OS target.

IIRC how things were done in previous versions, was rewritten.

My guess is that version 3790 would be ok.

-------------- Original message --------------
From: Else Kluger < xxxxx@utimaco.de mailto:xxxxx >

> Hi,
>
> you won’t see IRP_MJ_READ/WRITE below disk.sys, on that level
> SCSI_REQUEST_BLOCKs are used.
> Disk/classpnp sources are part of the DDK, so you can see what happens to
> IRP_MJ_READ/WRITE.
>
> Regards
> Else
>
>
>
>
> “giri jangam”
> To: “Windows System
> Software Devs Interest List”
> Sent by: cc:
> bounce-292618-16691@li Subject: [ntdev] Disk Lower
> filter help
> sts.osr.com
>
>
> 07/05/2007 08:52 AM
> Please respond to
> “Windows System
> Software Devs Interest
> List”
>
>
>
>
>
> Hi All,
> I am n! ew to t he disk lower filters and port drivers. I need to trap the

> read and write requests below the disk.sys driver layer. I am using
> diskperf sample. While attaching diskperf as upper filter I can trap all
> reads and writes. This is not the case when I attach it as lower filter.
> Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE
> requests below disk.sys? What changes I need to add to diskperf so that I
> can trap the read and write requests while attaching filter below disk.sys

> ?
> I can’t find any documents regarding the disk lower filters or port
> upper filter in the ddk. Can anybody suggest me good documents for the
> same?
>
> Thanks in advance,
> Giri.
>
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List

> Server section of OSR Online at

> http://ww! w.osr on line.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

> Can anybody tell me what happens to IRP_MJ_READ and IRP_MJ_WRITE

requests below disk.sys?

They are translated to IRP_MJ_SCSI/SCISOP_READ and IRP_MJ_SCSI/SCISOP_WRITE by
Disk.sys (actually by ClassPnP.sys which is a kernel-mode DLL created to share
the common parts of Disk and CdRom).


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com