[ Previous |
Next |
Contents |
Home |
Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2
SSA Disk Concurrent Mode of Operation Interface
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.
Note: In order for the concurrent mode interface to work, the node_number attribute of the ssar router must be set to a different, non zero, value on each of the hosts sharing a disk drive. After the node_number has been assigned. The host must be rebooted for it to take effect.
Device Driver Entry Point
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.
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:
- The top kernel extension did not perform a DD_CONC_REGISTER operation.
- The conc_cmd pointer is null.
- The devno
field in the conc_cmd structure is invalid.
- The cmd_op
field in the conc_cmd structure is not one of the four valid values previously listed.
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.
Top Kernel Extension 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.
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. |
- The concurrent command interrupt handler routine must have a short path length because it runs on the SSA disk device driver interrupt level. If substantial command processing is needed, then this routine should schedule an off-level interrupt to its own off-level interrupt handler.
- The top kernel extension must have an interrupt priority no higher than the SSA disk device driver's interrupt priority.
- The concurrent command interrupt handler routine might need to disable interrupts at INTCLASS0 if it is expected to use concurrent mode on SSA disk drive and some disks of different types. The other type of disk needs its own device driver to support the concurrent mode.
- A kernel extension that uses the DD_CONC_REGISTER ioctl must issue a DD_CONC_UNREGISTER ioctl before closing the SSA disk drive.
Related Information
The SSA Adapter Device Driver, ssadisk SSA Disk Device Driver, SSA Subsystem Overview.
[ Previous |
Next |
Contents |
Home |
Search ]