HP-UX Reference (11i v2 04/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
a
autochanger(7) autochanger(7)
...
For developers, the
ioctl functions available for accessing magneto-optical disk surfaces are described
in the manual pages for SCSI disk drivers. Several
ioctl functions provided specifically for magneto-
optical disks will be described here briefly. Included from
<sys/scsi.h>:
#define SIOC_WRITE_WOE _IOW(’S’, 17, int)
#define SIOC_VERIFY_WRITES _IOW(’S’, 18, int)
#define SIOC_ERASE _IOW(’S’, 19, struct scsi_erase)
#define SIOC_VERIFY_BLANK _IOW(’S’, 20, struct scsi_verify)
#define SIOC_VERIFY _IOW(’S’, 21, struct scsi_verify)
SIOC_ERASE (erase) and SIOC_WRITE_WOE
(write without erase) can be used together on character
special devices. By performing a pre-erase pass of magneto-optical disks, then later setting the SCSI disk
driver in write-without-erase mode, improved write performance can be achieved, eliminating the two-
pass erase-then-write which is normally necessary on magneto-optical devices.
SIOC_VERIFY_WRITES
(write and verify) performs a verification pass on any writes to magneto-optical
disks. This is a good safeguard for data integrity. However, write operations performed with the
verification pass exhibits a decrease in performance. When used with pre-erase and write-without-erase,
write and verify provide increased reliability of data without decreased performance. HP recommends
operating in write-and-verify mode if also performing write-without-erase.
The following are additional
ioctl functions that might be desirable for some magneto-optical products,
included from <sys/scsi.h>:
#define SIOC_GET_IR _IOR(’S’, 14, int)
#define SIOC_SET_IR _IOW(’S’, 15, int)
#define SIOC_SYNC_CACHE _IOW(’S’, 70, int)
SIOC_GET_IR determines the current state of immediate reporting (write caching) on the device.
SIOC_SET_IR enables or disables immediate reporting on the device. If SIOC_SET_IR is used to
enable write caching, it may be desirable to flush the write cache using the SIOC_SYNC_CACHE
ioctl
function. The command
/usr/sbin/scsictl
may be used to perform the pre-erase of magneto-
optical disks, set and check the status of immediate reporting.
With the surface module configured, several ioctl functions to get status and information from the
changer device are also available. These are
SIOC_ELEMENT_ADDRESSES
, SIOC_ELEMENT_STATUS,
and
SIOC_INQUIRY; they are explained further in the following section on the changer driver. Func-
tions that modify the state of the autochanger are not allowed when the surface module is configured into
the kernel.
SCSI MEDIUM CHANGER DEVICE DRIVER
The SCSI medium changer device driver performs moves between different media locations within an
autochanger. Each potential media location has a specific element address and is one of the following ele-
ment types:
storage A location to hold a unit of media not currently in use. Typically most media
will be located in this type of element.
import/export A location for inserting and removing media from the device. Movement of a
unit of media to this type of location is in effect an eject operation. Movement
of a unit of media from this type of location is a load operation.
data transfer A location for accessing media data. This is generally the location of a device
that reads and/or writes data on the media being handled by the media
changer device. Movement to this type of location is a physical-media-mount
operation. Movement from this type of location is a physical-media-unmount
operation.
media transport A location for media movement. Media is generally temporarily located in this
type of element only during actual media movement.
Changer Control Requests
The following ioctl functions are included from
<sys/chgrio.h>:
#define CHGR_SSRFC_IS_PRESENT _IOR(’X’, 1, int)
#define CHGR_CLEAR_RESET _IO(’X’, 2)
Section 7−−6 Hewlett-Packard Company − 3 − HP-UX 11i Version 2: September 2004