cctech Digest, Vol 2, Issue 12
cclist at sydex.com
Fri Dec 12 14:30:22 CST 2014
On 12/12/2014 11:56 AM, Craig Ruff wrote:
> You should be able to detect file mark indications in either the
> variable length or fixed block read modes. When the tape (or drive
> controller buffer position for those that perform buffering) is
> positioned at the file mark, you will get a check condition response
> to the issuance of the read command, then you (or the SCSI generic
> driver) issue the read sense command (immediately after the read, no
> other intervening commands!) and the file mark bit will be set in the
> sense buffer. For the generic SCSI devices, you can typically tell
> the driver to perform an auto sense for check condition responses.
> Just make sure you have properly told the driver where to put the
> sense data. I suppose a drive could have a manufacturer specific mode
> that could hide file marks, but I've never seen one. We did make use
> of manufacturer specific procedures to place the read head beyond the
> detected EOT mark so we could recover tapes that had been
> accidentally overwritten in the middle of recorded data.
I'm using a simple ASPI interface, so I'm talking to the SCSI controller
directly, issuing CDBs and getting REQUEST SENSE data back, so there's
not really any issue of a driver getting in the way.
As previously mentioned, the SCSI sense data does not reflect a filemark
in variable-length Read mode, but rather 0 bytes transferred with no
check condition indicated (i.e. both sense key and additional sense
code and sense qualifier are 0, indicating a normal completion of read;
ILI is not set in this case either.
About all that I can assume is that this is a quirk of this particular
tape-to-SCSI interface. It's probably not an issue and easily taken
care of in the code, since 0-length normal tape records aren't possible
More information about the cctalk