Contents

UserGetDataBuffer

Gets the data buffer associated with a particular I/O request.

Declaration

virtual kern_return_t UserGetDataBuffer(SCSIDeviceIdentifier targetID, uint64_t controllerTaskID, IOBufferMemoryDescriptor **buffer);

Parameters

Return Value

A value that indicates the result of getting the buffer. kIOReturnSuccess indicates success. For error definitions, see IOKit Constants.

Discussion

Your dext class can call this method inside UserProcessParallelTask to get the data buffer associated with the I/O request identified by controllerTaskID. Calling this method can have a significant impact on performance, so call it only if you require access to the data buffer. The caller needs to prepare new DMA mappings for this buffer and can no longer use the mappings in fBufferIOVMAddr.

The framework releases the buffer when the caller invokes the parallel task completion callback. Don’t retain this buffer after invoking the task completion callback.