<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BlockStorageDeviceDriverKit",
  "identifier" : "/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "BlockStorageDeviceDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserBlockStorageDevice"
  },
  "title" : "IOUserBlockStorageDevice"
}
-->

# IOUserBlockStorageDevice

A DriverKit provider object that manages communications with a block storage device.

```
class IOUserBlockStorageDevice;
```

## Overview

Implement your driver by subclassing this class and overriding all C++ pure virtual methods.

### Specifying the Driver’s Personality Information

When you subclass `IOUserBlockStorageDevice`, update the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/IOKitPersonalities> key of your driver extension’s `Info.plist` file with information to match your driver to the correct hardware. For this class, always include the keys and values in the following table:

|Key                     |Value                             |
|------------------------|----------------------------------|
|IOClass                 |`IOUserBlockStorageDevice`        |
|IOUserClass             |The name of your custom dext class|
|CFBundleIdentifierKernel|`com.apple.iokit.IOStorageFamily` |

## Topics

### Running the Service

Override these functions from the base <doc://com.apple.documentation/documentation/DriverKit> framework in your driver class.

[`init`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/init)

Handles the basic initialization of the service.

[`Start`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/Start)

Starts the current service and associates it with the specified provider.

[`Stop`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/Stop)

Stops the service associated with the specified provider.

[`free`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/free)

Performs any final cleanup for the service.

### Reporting Device Metadata

[`GetVendorString`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/GetVendorString)

Gets a string that identifies the vendor in response to a call from the framework.

[`GetProductString`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/GetProductString)

Gets a string that identifies the product in response to a call from the framework.

[`GetRevisionString`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/GetRevisionString)

Gets a string that identifies the current revision in response to a call from the framework.

[`GetAdditionalInfoString`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/GetAdditionalInfoString)

Gets a string that provides additional information in response to a call from the framework.

[`DeviceString`](/documentation/BlockStorageDeviceDriverKit/DeviceString)

A type that represents a string of character data from the device.

[`GetDeviceParams`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/GetDeviceParams)

Gets device parameters in response to a call from the framework.

[`DeviceParams`](/documentation/BlockStorageDeviceDriverKit/DeviceParams)

A structure that represents hardware-specific properties of the block storage device.

### Reporting Device Capabilities

[`ReportEjectability`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/ReportEjectability)

Returns a Boolean value that indicates whether the media is ejectable, in response to a call from the framework.

[`ReportRemovability`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/ReportRemovability)

Returns a Boolean value that indicates whether the media is removable, in response to a call from the framework.

[`ReportWriteProtection`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/ReportWriteProtection)

Returns a Boolean value that indicates whether the media is write protected, in response to a call from the framework.

### Accessing the Device

[`DoAsyncUnmap`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/DoAsyncUnmap)

Sends an asynchronous request to the dext to reclaim storage by unmapping.

[`BlockRange`](/documentation/BlockStorageDeviceDriverKit/BlockRange)

A structure that represents a range of blocks.

[`DoAsyncSynchronize`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/DoAsyncSynchronize)

Forces the hardware buffer to flush data blocks to the media.

[`DoAsyncEjectMedia`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/DoAsyncEjectMedia)

Ejects the media.

[`Complete`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/Complete)

Indicates that the dext completed an asynchronous call.

[`DoAsyncReadWrite`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/DoAsyncReadWrite)

Starts an asynchronous read or write operation.

[`IOUserStorageOptions`](/documentation/BlockStorageDeviceDriverKit/IOUserStorageOptions)

Options that affect the performance of read-write operations.

[`CompleteIO`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/CompleteIO)

Indicates that the dext completed an asynchronous read-write call.

### Instance Methods

[`DoAsyncUnmapPriv`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/DoAsyncUnmapPriv)

[`RegisterDext`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/RegisterDext)

## Relationships

### Inherits From

[`IOService`](/documentation/DriverKit/IOService)

---

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)