Date: February 2, 1990 X3T9.2/90-28 Revision 0 From: Mike Racelo Subject: Modifying Actual Retry Count/Adding Unrecorded Block Count in buffer The Sense-Key Specific Data of Request Sense has what we believe to be an overkill: a 2 byte Actual Retry Count field. This 2 byte field says some device is capable of doing up to 65,535 retries. We recommend this field be reduce to 1 byte. The freed byte (presently the msb of the Retry Count) is needed to show the unrecorded block count. The modified Sense-Key Specific data is shown below. Table 7-37 Actual Retry and Unrecorded Block Buffer Count ============================================================ Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================= 15 |SKSV | Reserved | ------------------------------------------------------------- 16 | Unrecorded Block Count | ------------------------------------------------------------- 17 | Actual Retry Count | ============================================================= Modifying the Actual Retry Count in the Sense-Key Specific field will also match the Read-Write Error Recovery Page, Table 9-27, Retry Counts. The Unrecorded Block Count field is needed to report unrecorded blocks sitting in the device buffer as a result of the Write error. The Information Field per SCSI-1 contains the blocks or bytes not transferred to the target. To simplify describing this confusing subject see figure 1. This is a very simple example of a Fixed Block mode Write error starting from beginning of tape (BOT). The Information field will report 3 blocks not transferred to the target. The number of unrecorded data blocks in the target buffer is not known. This picture gets more complex and confusing when write errors occur in the middle of tape and Fixed blocks and Variable blocks were transferred. Figure 2 is an example of write errors in mixed Variable and Fixed block mode. Note, in this case the Information Field will be larger than the CDB. SCSI-2 further requires the Information Field to include filemarks and setmarks. The new section on page 7-47 will add a new paragraph following the actual retry count field paragraph and shall read as follows: "The actual retry count field returns implementation-specific information on the actual number of retries of the recovery algorithm used in attempting to recover an error or exception. IMPLEMENTORS NOTE: It is recommended that this field relate to the retry count fields within the error recovery page of the MODE SELECT command. The unrecorded block count field returns the number of data blocks, and filemarks and setmarks for sequential devices in the target buffer that have not been transferred to the recording medium." We believe this new field will answer future questions when Initiators experience Write errors in buffered mode. This new field will give the information of where the write error occurred on tape and how many unrecorded blocks are in the target buffer. The unrecorded block count may be used by the Recover Buffered Data command. Requested | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | = 10 Buffer | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | | | = 7 Actual | 1 | 2 | | | | | | | | | = 2 Residue = Requested - ( Actual + Buffer ) = 10 - ( 2 + 5 ) Residue = 3 Blocks not transferred Figure 1. Write error from BOT in Fixed Block Mode Requested BOT<--| 1 |2|3|4|5| 6 | 7 | 8 | 9 | -->EOT Buffer BOT<--| 1 |2|3|4|5| 6 | 7 | 8 | | -->EOT Actual BOT<--| 1 |2|3| | | | | | | -->EOT Residue = Requested SCSI-1 Residue = Requested - ( Actual + Buffer ) SCSI-2 Figure 2. Write error not at BOT with mixed Fixed and Variable Blocks in buffer.