The SSA subsystem supports the ability to broadcast one-byte message codes from one host to all other hosts connected to the same disk drive. This message-passing capability can be used to synchronize access to the disk drive. The operating system has a concurrent mode interface to use this hardware functionality.
The concurrent mode of operation requires that a top kernel extension runs on all hosts sharing a disk drive. The top kernel extensions communicate with each other via the SSA subsystem using the concurrent mode interface of the SSA disk device driver. This interface allows a top kernel extension to send and receive messages between hosts.
The concurrent mode interface consists of an entry point in both the SSA disk device driver and the top kernel extension. Two ioctls register and unregister the top kernel extension with the SSA disk device driver. The SSA disk device driver's entry point provides the means to send messages as well as lock, unlock, and test disk drive. The top kernel extension entry point processes interrupts, including receiving messages from other hosts.
The SSA disk device driver concurrent mode entry point sends commands from the top kernel extension for a specified SSA Disk. The top kernel extension calls this entry point directly. The DD_CONC_REGISTER ioctl operation registers entry points.
This entry point function takes one argument, which is a pointer to a conc_cmd structure, that is defined in the /usr/include/sys/ddconc.h file. The conc_cmd structures must be allocated by the top kernel extension. The concurrent mode command operation is specified by the cmd_op field in the conc_cmd structure and can have the following values. For each operation, the devno field of the conc_cmd structure specifies the appropriate SSA disk drive. The concurrent mode command operation can have the following values:
Value | Description |
---|---|
DD_CONC_SEND_REFRESH | Broadcasts the one-byte message code specified by the message field of the conc_cmd structure. The code is sent to all hosts connected to the SSA disk drive. |
DD_CONC_LOCK | Locks the specified SSA disk drive for this host only. No other hosts will be able to modify data on the disk drive. |
DD_CONC_UNLOCK | Unlocks the SSA disk drive. Other hosts can lock and modify data on the disk drive. |
DD_CONC_TEST | Issues a test disk command to verify that the SSA disk drive is still accessible to this host. |
The concurrent mode entry point returns a value of EINVAL if any of the following are true:
If the concurrent mode entry point accepts the conc_cmd structure, the entry point returns a value of 0. If the SSA disk device driver does not have resources to issue the command, the driver queues the command until resources are available. The concurrent commands queued in the SSA disk device driver are issued before any read or write operations queued by the driver's strategy entry point.
The completion status of the concurrent mode commands are returned to the top kernel extension's concurrent mode interrupt handler entry point.
The top kernel extension must have a concurrent mode command interrupt handler entry point, which is called directly from the SSA disk device driver's interrupt handler. This function can take four arguments: the conc_cmd pointer, and the cmd_op, message_code, and devno fields. The conc_cmd pointer points to a conc_cmd structure. These arguments must be of the same type specified by the conc_intr_addr function pointer field in the dd_conc_register structure.
The following valid concurrent mode commands are defined in the /usr/include/sys/ddcon.h file. For each, the devno field specifies the appropriate SSA disk drive.
Command | Description |
---|---|
DD_CONC_SEND_REFRESH | Indicates the DD_CONC_SEND_REFRESH Device Driver entry point completed. The error field in the conc_cmd structure contains the return code necessary for the completion of this command. The possible values are defined in the /usr/include/sys/errno.h file. The conc_cmd pointer argument to the top kernel extension's special interrupt handler entry point is non-null. The cmd_op, message_code, and devno fields are 0. |
DD_CONC_LOCK | Indicates the DD_CONC_SEND_LOCK device driver entry point completed. The error field in the conc_cmd structure contains the return code necessary for the completion of this command. The possible values are defined in the /usr/include/sys/errno.h file. The conc_cmd pointer argument to the top kernel extension's special interrupt handler entry point is non-null. The cmd_op, message_code, and devno fields are zero. |
DD_CONC_UNLOCK | Indicates the DD_CONC_UNLOCK device driver entry point completed. The error field in the conc_cmd structure contains the return code necessary for the completion of this command. The possible values are defined in the /usr/include/sys/errno.h file. The conc_cmd pointer argument to the top kernel extension's special interrupt handler entry point is non-null. The cmd_op, message_code, and devno fields are zero. |
DD_CONC_TEST | Indicates the DD_CONC_TEST device driver entry point completed. The error field in the conc_cmd structure contains the return code necessary for the completion of this command. The possible values are defined in the /usr/include/sys/errno.h file. The conc_cmd pointer argument to the top kernel extension's special interrupt handler entry point is non-null. The cmd_op, message_code, and devno fields are zero. |
DD_CONC_RECV_REFRESH | Indicates a message with message_code was received for the SSA disk drive specified by the devno argument. The conc_cmd argument is null for this operation. |
DD_CONC_RESET | Indicates the SSA disk drive specified by the devno argument was reset, and all pending messages or commands have been flushed. The argument conc_cmd is null for this operation. |