DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

st01(7)


st01 -- Storage Device Interface (SDI) tape target driver

Description

The st01 tape driver receives command requests from the kernel through the read(2), write(2), and ioctl(2) system calls. The st01 driver generates the appropriate commands and passes them through the host adapter driver to the tape device. When command execution is complete, the host adapter driver notifies st01 through an interrupt. After this notification, st01 performs any required error recovery, and indicates to the kernel that the input/output (I/O) request is complete. The st01 driver operates independent of the hardware used to communicate with the HBA bus.

I/O requests must be in length a multiple of the tape block length. The default value is 512 bytes.

Only raw character interface files are provided. When opened, the tape is assumed to be positioned as desired. If a retension-on-open special file is opened, the tape is retensioned before any I/O is performed. When a T_RWD, T_RETENSION, T_LOAD, or T_UNLOAD ioctl is requested and the tape has been written, two file marks are written before the ioctl is executed.

The open(2) on a tape device can fail if a tape is not inserted, resulting in the error report EIO. An open(2) can also fail if the tape controller associated with the special file is not detected by the driver. In this case, the error reported is ENXIO.

The following table lists the actions that occur on close, depending on whether the file is designated as rewind or no-rewind, and if the tape was written or read:

Rewind on Tape Tape Action on
Close? Read? Written? Close
Yes Yes N/A Rewind tape
Yes N/A Yes Write two file marks and rewind tape
Yes No No Rewind tape
No No No No tape movement
No Yes N/A Position tape after next file mark
No N/A Yes Write one file mark and position tape after this file mark

 Rewind on   Tape    Tape       Action on
 Close?      Read?   Written?   Close
 Yes         Yes     N/A        Rewind tape
 Yes         N/A     Yes        Write two file marks and rewind tape
 Yes         No      No         Rewind tape
 No          No      No         No tape movement
 No          Yes     N/A        Position tape after next file mark
 No          N/A     Yes        Write one file mark and position
                                tape after this file mark

A read occurring when the tape is positioned immediately before a file mark returns zero bytes, and the tape is positioned after the file mark. As with other raw devices, seeks are ignored. Some tape devices allow both reads and writes to occur between rewinds; the st01 driver supports these devices.

ioctl calls

The ioctl(2) calls used by the st01 driver are documented on the sdi(7) manual page.

References

sdi(7)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004