I need to do scatter/gather i/o on a disk device. I’m chaining MDL’s to do
it. Whe I get to a certain number of MDL’s, I get a bug check after
calling the disk driver.
Bugcheck code 0000000A
Arguments bdff2000 0000000c 00000000 8006b966
ChildEBPRetAddr Args to Child
be07d220 80438d6f 00000004 bdff2000 8006b966
NTOSKRNL!DbgBreakPointWithStatus+0x4
be07d5a8 804b54c0 00000000 bdff2000 0000000c NTOSKRNL!KeBugCheckEx+0x5e9
be07d5c4 8006b966 badb0d00 00000170 804b66a3
NTOSKRNL!Kei386EoiHelper+0x2f30
8457131c 00000170 00000171 00000172 00000173
HAL!WRITE_PORT_BUFFER_USHORT+0xe
Is there a way to know how many MDL’s can be chained together to describe a
fragmented buffer for a read or write operation?
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
Why do you need to chair MDL’s to do scatter/gather? Can’t you just use the
GetScatterGatherList function?
-daniel
-----Original Message-----
From: xxxxx@powerquest.com
[mailto:xxxxx@powerquest.com]
Sent: Tuesday, July 10, 2001 2:56 PM
To: NT Developers Interest List
Subject: [ntdev] How many MDLs can I chain together?
I need to do scatter/gather i/o on a disk device. I’m chaining MDL’s to do
it. Whe I get to a certain number of MDL’s, I get a bug check after
calling the disk driver.
Bugcheck code 0000000A
Arguments bdff2000 0000000c 00000000 8006b966
ChildEBPRetAddr Args to Child
be07d220 80438d6f 00000004 bdff2000 8006b966
NTOSKRNL!DbgBreakPointWithStatus+0x4
be07d5a8 804b54c0 00000000 bdff2000 0000000c NTOSKRNL!KeBugCheckEx+0x5e9
be07d5c4 8006b966 badb0d00 00000170 804b66a3
NTOSKRNL!Kei386EoiHelper+0x2f30
8457131c 00000170 00000171 00000172 00000173
HAL!WRITE_PORT_BUFFER_USHORT+0xe
Is there a way to know how many MDL’s can be chained together to describe a
fragmented buffer for a read or write operation?
You are currently subscribed to ntdev as: xxxxx@intel.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
I’m not touching any hardware in my driver. I create a virtual disk device
and call the hard disk drivers. Can I use GetScatterGatherList() to call
the disk drivers from my driver?
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
> I’m not touching any hardware in my driver. I create a virtual disk
device
and call the hard disk drivers. Can I use GetScatterGatherList() to call
the disk drivers from my driver?
For what? GetScatterGatherList is for DMA (which is hardware) only.
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
Your disk class driver will not receive a scatter/gather request.
0x10000 is the largest disk transfer size you will get. You will get an
MDL pointing to a single buffer in your driver.
In your driver, try this:
- Define your IRP stack size to be the size of the largest disk stack
you will be talking to plus 1 (your targets).
- On IRP for virtual disk device (0x10000 in size); lets say you want to
spread this request over 4 other disks…
- Using the same IRP:
– IoCopyCurrentIrp…()
– Modify next stack location to point to the proper disk and change the
MDL and parameters to reflect the partial transfer (save original MDL in
context record).
– IoCallDriver() to the real disk you want ot communicate with.
– In the completion routine, do:
— IoCopyCurrent…()
— Modify next stack location to (just as above)
— IoCallDriver
— return STATUS_MORE_PROCESSING_REQUIRED
— In the completion routine, do:
---- Just as above until all sub-transfers are complete.
What is happening, sorry for the chicken scratch, is that you are using
the IRP sent to you to pass along to the drives you need to access; only
you are modifying the parameters. I suspect you will need to maintain a
context structure to pass between completion routines so that you know
the IRP and the saved MDL and maybe some other tid-bits of information.
Jamey
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@powerquest.com
Sent: Thursday, July 12, 2001 3:00 PM
To: NT Developers Interest List
Subject: [ntdev] RE: How many MDLs can I chain together?
I’m not touching any hardware in my driver. I create a
virtual disk device
and call the hard disk drivers. Can I use
GetScatterGatherList() to call
the disk drivers from my driver?
You are currently subscribed to ntdev as:
xxxxx@storagecraft.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