Hi,
I am trying to speed up a cross-platform Software Raid (RAID5) driver in WDM.
Currently, my method is to split the incoming IO into stripe sized chunks, allocate a parity buffer, compute the parity, and write stripe sized data to the individual disks. This unfortunately results in a large number of IO if the incoming buffer is large.
I was looking into scatter/gather lists and want to see if this approach is possible?
- Call
IoGetDmaAdapter
for the member disks. Currently, I am calling this from the completion routine of anIOCTL_GET_DRIVE_LAYOUT_EX
call. - Construct the MDL for scatter/gather lists using the incoming IO MDL and my parity MDL spliced together.
- Execute the transaction.
I tried calling IoGetDmaAdapter
using the PDO I get in my disk filter driver, but I don’t get a _DMA_ADAPTER
pointer even after trying several options for DEVICE_DESCRIPTION
as mentioned in earlier OSR posts or in Windows samples. I always end up with a nullptr
.
My PDO has !devobj
output:
: kd> !devobj 0xffffa70a`c5c73050
Device object (ffffa70ac5c73050) is for:
00000048 \Driver\storvsc DriverObject ffffa70ac1c6fa10
Current Irp 00000000 RefCount 0 Type 00000007 Flags 00001050
SecurityDescriptor ffffdf80e7e1d8e0 DevExt ffffa70ac5c731a0 DevObjExt ffffa70ac5c74120 DevNode ffffa70ac8608650
ExtensionFlags (0000000000)
Characteristics (0x00000180) FILE_AUTOGENERATED_DEVICE_NAME, FILE_DEVICE_SECURE_OPEN
AttachedDevice (Upper) ffffa70ac610e060 \Driver\disk
Device queue is not busy.
Is my approach feasible? If not, is there another way to execute DMA scatter/gather from my disk filter driver?