9.1.7 Cancel Command

Commands that have been sent to a fast disk device, but have not yet completed, can be canceled by sending a cancel command. The client specifies the command to cancel by placing a pointer to the command in the BC_CB_Buffer_Ptr field of the cancel command block.

If it is possible to cancel the command, the command complete callback will be executed, and the command will complete with a status of BDS_Canceled. After the canceled command has been canceled, then the cancel command will be completed, and its callback will be executed with a status of BDS_Success. In all cases, if a command is canceled, the canceled command's callback will be called before the callback is called.

If the command that was to be canceled is already in progress or is not in the current command queue for the fast disk device, the cancel command will fail with a status of either BDS_Cmd_In_Progress, or BDS_Invalid_Cmd_Ptr.