Open SCSI Integrator's Manual for NonStop S-Series Servers

The Open SCSI I/O Process (IOP)
Open SCSI Integrator’s Manual for NonStop Servers422988-002
4-6
The WRITEREAD Buffer Header Block
Figure 4-3 shows an example of the read count and write count for an operation that
writes data to a device. In this example, the amount of data written to the IOP requires
the entire buffer, but the application reads back just the header block, the updated CCB,
and the contents of the sense buffer, if it was specified.
One way to minimize the amount of data transferred between an application and an IOP
is for the sense buffer to follow the CCB whenever the sense buffer is specified (see
Figure 4-3
), so that it is not necessary to transfer an empty buffer just to get sense
information. If the application does not need the data it is writing after it is written (the
application is not writing the same data multiple times to the device), the sense buffer
could use the same offset as the data buffer and thus overwrite the data that was written
to the device. Note that this mechanism should not be used when reading from a device,
because both the data buffer and sense buffer might be returned from the device and the
data for one would overwrite the data for the other.
The WRITEREAD Buffer Header Block
The header block for the WRITEREAD buffer (see Figure 4-4) contains fields needed
by the IOP to determine whether the buffer contains a CCB for controlling the device, to
check for compatibility, and to find the relevant pieces of data in the buffer.
Figure 4-2. WRITEREAD Buffer Structure for Read Operation
Figure 4-3. WRITEREAD Buffer Structure for Write Operation
Header
Block
CCB Sense Buffer
(optional)
Data Buffer
(optional)
Read Count
007CDT .CDD
Write Count
Header
Block
CCB Sense Buffer
(optional)
Data Buffer
(optional)
Write Count
008CDT .CDD
Read Count