HP-UX Reference (11i v2 04/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
s
scsi_disk(7) scsi_disk(7)
value disables write verification. The value
1 enables write verification. Although write verification is
primarily intended for optical media, some systems may support write verification on normal disk dev-
ices.
The
SIOC_VERIFY ioctl verifies that a media area contains valid data (that is, data that has been
correctly written). Verified media will not cause I/O errors when reading is attempted. The media area to
be verified is specified via the
start_lba and block_cnt fields. Although verification is intended pri-
marily for optical media, some systems may support verify operations on normal disk devices.
The
SIOC_WRITE_WOE
ioctl controls the write mode used for magneto-optical disk devices. Normally
magneto-optical write operations require two physical head passes. The first pass erases the media area
to be written. The second pass actually writes the data. Write-without-erase mode dramatically
increases write performance by skipping the first (erase media area) pass. To ensure that the correct
data results, it is essential that write-without-erase operations be performed only on media that is known
to be blank (previously erased or never used). The
SIOC_WRITE_WOE ioctl can be used to enable or dis-
able write-without-erase. A zero value disables write-without-erase. The value
1 enables write-without-
erase.
The
SIOC_ERASE ioctl allows media areas to be explicitly erased. The media area to be erased is
specified via the start_lba and
block_cnt fields. Media areas erased in this manner can be written
using write-without-erase mode. Note that an erased media area is different from a media area written
with some data values (e.g. zeros). An erased media area should not be read. Attempting to read an
erased media area generally results in an I/O error.
The
SIOC_VERIFY_BLANK
ioctl verifies that a media area has been erased and is suitable for being
written using write-without-erase mode. The media area to be verified is specified via the
start_lba
and block_cnt fields.
The following optical disk device specific information is 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)
/* structure for SIOC_ERASE ioctl */
struct scsi_erase {
unsigned int start_lba;
unsigned short block_cnt;
};
/* structure for SIOC_VERIFY_BLANK and SIOC_VERIFY ioctls */
struct scsi_verify {
unsigned int start_lba;
unsigned short block_cnt;
};
FILES
/usr/include/sys/scsi.h
SEE ALSO
mediainit(1), mknod(1M), ioctl(2), disk(7), scsi(7).
HP-UX 11i Version 2: September 2004 − 3 − Hewlett-Packard Company Section 7−−143