include blockdev.inc BlockDev_Command_Block STRUC BD_CB_Next dd ? BD_CB_Command dw ? BD_CB_Cmd_Status dw ? BD_CB_Flags dd ? BD_CB_Cmd_Cplt_Proc dd ? BD_CB_Sector dq ? BD_CB_Count dd ? BD_CB_Buffer_Ptr dd ? BD_CB_Reserved_Client dd ? BD_CB_Reserved_BlockDev dd ? BD_CB_Reserved_FastDisk dd ? BlockDev_Command_Block ENDS |
The BlockDev_Command_Block structure contains information about a block device command.
BD_CB_Next
Points to the next command in the command list.
BD_CB_Command
Specifies the command to carry out. It can be one of the following values:
Value | Meaning |
BDC_Cancel | Cancel command. |
BDC_Read | Read from device. |
BDC_Verify | Verify read or write. |
BDC_Write | Write to device. |
Command values in the range 8000h through 0FFFFh are reserved for device-specific commands.
BD_CB_Cmd_Status
Specifies the status of the command. It can be one of the following values:
Value | Meaning |
BDS_Canceled | Command was canceled. |
BDS_Cmd_In_Progress | Can't cancel command in progress. |
BDS_Device_Error | Device or adapter failed. |
BDS_Invalid_Cmd_Ptr | Cancellation of invalid command pointer. |
BDS_Invalid_Command | Invalid command. |
BDS_Invalid_Sector_Number | Invalid sector number. |
BDS_Media_Error | Read or write failed. |
BDS_Success | Command completed successfully. |
BDS_Success_With_ECC | Command completed successfully after error correction. |
BDS_Success_With_Retries | Command completed successfully after repetition. |
All values below BDS_First_Error_Code (10h) imply successful completion.
BD_CB_Flags
Specifies additional actions to take when carrying out the command. This field can be a combination of the following values:
Value | Meaning |
BDCF_Dont_Cache | Noncached command |
BDCF_High_Priority | High priority |
BDCF_Scatter_Gather | Scatter or gather |
BD_CB_Cmd_Cplt_Proc
Points to the command-completion callback procedure.
BD_CB_Sector
Specifies the count of sectors for the block device.
BD_CB_Count
Specifies the count.
BD_CB_Buffer_Ptr
Points to the buffer.
BD_CB_Reserved_Client
Reserved; do not use.
BD_CB_Reserved_BlockDev
Reserved; do not use.
BD_CB_Reserved_FastDisk
Reserved; do not use.