- DiskPerfDeviceControl () of diskperf in wdk;
- Posted by krish on May 12th, 2008
In the function DiskPerfDeviceControl (), for the control codes that
diskperf does not process it does the following:
...
else {
//
// Set current stack back one.
//
Irp->CurrentLocation++,
Irp->Tail.Overlay.CurrentStackLocation++;
}
I do not what understand what this code is doing? I believe the intent
here is to just pass on the control codes to the next driver. So
shouldn't it be doing IoCopyCurrentIrpStackLocationToNext (), so that
next lower driver gets the same information as diskperf. Also WDK says
that undocumented members of _IRP are for IO manager only, then why
they are being used here.
Please help. Thanks.
- Posted by Maxim S. Shatskih on May 12th, 2008
Consider this to be IoSetPreviousIrpStackLocation
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
- Posted by krish on May 13th, 2008
On May 12, 4:39 pm, "Maxim S. Shatskih" <ma...@storagecraft.com>
wrote:
Hi Maxim, Thanks for the reply.
What I'm doing in my diskperf is that I'm trying to modify the
contents of the Irp->AssociatedIrp.SystemBuffer after the IoCallDriver
() from the lower driver (that is disk.sys, I believe).
so it's like:
if (IoControlCode == IOCTL_DISK_PERFORMANCE) {
// current code
}
else {
Irp->CurrentLocation++,
Irp->Tail.Overlay.CurrentStackLocation++;
status = IoCallDriver ();
// my code to modify Irp->AssociatedIrp.SystemBuffer contents goes
here...
return (status);
}
But unfortunately I'm not seeing the behavior I should see. It looks
like the SystemBuffer does not gets changed and the upper driver sees
the same contents as sent by the lower driver. Any clue what may be
going wrong. Thanks.
- Posted by Doron Holan [MSFT] on May 13th, 2008
well, then shouldn't it be IoSkipCurrentIrpStackLocation?
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:O2R1rlItIHA.4952@TK2MSFTNGP05.phx.gbl...
- Posted by David Craig on May 13th, 2008
It is your's, Microsoft's, code. In diskperf.c at line 1432 of WinDDK
6001.18000.
"Doron Holan [MSFT]" <doronh@online.microsoft.com> wrote in message
news:%232yFj8KtIHA.5472@TK2MSFTNGP06.phx.gbl...
- Posted by krish on May 13th, 2008
On May 12, 9:49 pm, "David Craig" <driv...@nowhere.us> wrote:
Doron, I beg your pardon but I did not understand your question. :-(
- Posted by krish on May 13th, 2008
On May 12, 9:49 pm, "David Craig" <driv...@nowhere.us> wrote:
Sorry it was David's question that I did not understand.
- Posted by Doron Holan [MSFT] on May 13th, 2008
I know it is a sample, the question was slightly rhetorical, but since i
have never really looked at disk.sys's source, it was also an honest
question...
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"David Craig" <drivers@nowhere.us> wrote in message
news:ud$27SLtIHA.3564@TK2MSFTNGP03.phx.gbl...