<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BlockStorageDeviceDriverKit",
  "identifier" : "/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/DoAsyncReadWrite",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BlockStorageDeviceDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserBlockStorageDevice@F@DoAsyncReadWrite#b#i#k#k#k#k#i#"
  },
  "title" : "DoAsyncReadWrite"
}
-->

# DoAsyncReadWrite

Starts an asynchronous read or write operation.

```
virtual kern_return_t DoAsyncReadWrite(bool isRead, uint32_t requestID, uint64_t dmaAddr, uint64_t size, uint64_t lba, uint64_t numOfBlocks, IOUserStorageOptions options);
```

## Parameters

`requestID`

An opaque identifier. After the dext completes the request, it calls [`CompleteIO`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/CompleteIO) and sends this value as a parameter.

`dmaAddr`

The DMA address of the data buffer.

`size`

The size of the data buffer.

`lba`

The start logical block number.

`numOfBlocks`

The number of blocks to read or write.

`options`

Data transfer options. These can be any combination of `kIOUserStorage…` values (defined in [`IOUserStorageOptions`](/documentation/BlockStorageDeviceDriverKit/IOUserStorageOptions)) combined together with the logical `OR` operator.

## Return Value

A value that indicates the result of the read/write operation. <doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> indicates success. For error definitions, see <doc://com.apple.documentation/documentation/iokit/iokit_constants>.

## Discussion

When the read or write operation completes, the dext calls your [`CompleteIO`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/CompleteIO) method with the results of the operation.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)