Hello Everybody,
The OSR book on NT drivers says “On allocation, the I/O Manager allocates
space for the fixed portion of the IRP plus enough space to contain
atleast as many I/O Stack Locations as there are drivers in the driver
stack that will process this request.”
-
My question is that how will the I/O Manager know that there are say, 5
layered drivers to complete an I/O request?
The StackSize field in the DEVICE_OBJECT specifies this. But, I am not
sure how is this information linked during the allocation of an IRP by the
I/O Manager.
-
How are multiple I/O Stack Locations linked in an IRP for a layered
driver?
I have checked the ntddk.h for the definition of the IRP struct. All that
it contains is the pointer to the Current IO Stack Location.
Regards,
Bhargav
D.Bhargav
Wipro Technologies,
Madhapur,
Hyderabad
India
Ph: 091-40-6565563
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> 1. My question is that how will the I/O Manager know that there are say, 5
layered drivers to complete an I/O request?
The StackSize field in the DEVICE_OBJECT specifies this. But, I am not
sure how is this information linked during the allocation of an IRP by the
I/O Manager.
You must pass the DeviceObject->StackSize to the IoAllocateIrp function.
- How are multiple I/O Stack Locations linked in an IRP for a layered
driver?
I have checked the ntddk.h for the definition of the IRP struct. All that
it contains is the pointer to the Current IO Stack Location.
IRP is:
struct _IRP
an array of struct _IO_STACK_LOCATION
The “struct _IRP” part has a pointer to the current stack location.
IoCallDriver function shifts it back (what was “next” becomes “current”),
IoCompleteRequest shifts it forward before calling the next completion
routine.
Max
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
----- Original Message -----
From: “D Bhargav”
To: “NT Developers Interest List”
Sent: Tuesday, February 06, 2001 12:58 AM
Subject: [ntdev] Basic Question Regarding I/O Stack Locations
> Hello Everybody,
>
> The OSR book on NT drivers says “On allocation, the I/O Manager allocates
> space for the fixed portion of the IRP plus enough space to contain
> atleast as many I/O Stack Locations as there are drivers in the driver
> stack that will process this request.”
>
> 1. My question is that how will the I/O Manager know that there are say, 5
> layered drivers to complete an I/O request?
NO, only one driver completes the request. You pass the IRP down the driver
stack, and the lowest driver to handle it completes the request. Note:
other
drivers may catch the completion with IoSetCompletionRoutine.
> The StackSize field in the DEVICE_OBJECT specifies this. But, I am not
> sure how is this information linked during the allocation of an IRP by the
> I/O Manager…
> 2. How are multiple I/O Stack Locations linked in an IRP for a layered
> driver?
The IRP stack is allocated with the IRP as an array following the IRP header
> I have checked the ntddk.h for the definition of the IRP struct. All that
> it contains is the pointer to the Current IO Stack Location.
>
Don Burn
Windows 2000 Device Driver and Filesystem consulting
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
A quick check of the documentation fairly well answers the question. You
either pass the stack size, or number of stack locations of a device object
which contains that information.
Gary G. Little
Sr. Staff Engineer
Broadband Storage, LLC
xxxxx@broadstor.com
xxxxx@delphieng.com
-----Original Message-----
From: D Bhargav [mailto:xxxxx@wipro.com]
Sent: Monday, February 05, 2001 9:59 PM
To: NT Developers Interest List
Subject: [ntdev] Basic Question Regarding I/O Stack Locations
Hello Everybody,
The OSR book on NT drivers says “On allocation, the I/O Manager allocates
space for the fixed portion of the IRP plus enough space to contain
atleast as many I/O Stack Locations as there are drivers in the driver
stack that will process this request.”
-
My question is that how will the I/O Manager know that there are say, 5
layered drivers to complete an I/O request?
The StackSize field in the DEVICE_OBJECT specifies this. But, I am not
sure how is this information linked during the allocation of an IRP by the
I/O Manager.
-
How are multiple I/O Stack Locations linked in an IRP for a layered
driver?
I have checked the ntddk.h for the definition of the IRP struct. All that
it contains is the pointer to the Current IO Stack Location.
Regards,
Bhargav
D.Bhargav
Wipro Technologies,
Madhapur,
Hyderabad
India
Ph: 091-40-6565563
You are currently subscribed to ntdev as: xxxxx@delphieng.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com