|
|
|
|
Logical and physical I/O functions allow access to volume storage and require only that the issuing process have access to the volume; however, DSA disks and the disk class driver (DUDRIVER) do not accept physical QIO data transfers or seek operations.
The results of logical and physical I/O operations are unpredictable if an ancillary control process (ACP) or extended QIO processing (XQP) is present. |
Non-DSA disk devices can read or write up to 65,535 bytes in a single request. DSA devices connected to an HSC50 can transfer up to 4 billion bytes in a single request. In all cases, the maximum size of the transfer is limited by the number of pages that can be faulted into the process' working set, and then locked into physical memory. (The disk driver is responsible for any memory management functions of this type.) The size of the transfer does not affect the applicable quotas (direct I/O count, buffered I/O count, and asynchronous system trap (AST) count limit). These quotas refer to the number of outstanding I/O operations of each type, not the size of the I/O operation being performed.
The volume to which a logical or virtual function is directed must be mounted for the function actually to be executed. If it is not mounted, either a "device not mounted" or "invalid volume" status is returned in the I/O status block.
Disk I/O Functions lists the logical, virtual, and physical disk I/O functions and their function codes. ACP-QIO Interface describes the QIO level interface to the disk device ACP.
Function Code | Arguments | Type1 | Function Modifiers | Function |
---|---|---|---|---|
IO$_ACCESS
|
P1, [P2],[P3], [P4],
[P5]
|
V
|
IO$M_CREATE IO$M_ACCESS
|
Search a directory for a specified
file and access the file if found.
|
IO$_ACPCONTROL
|
P1,[P2],[P3], [P4],[P5]
|
V
|
IO$M_DMOUNT
|
Perform miscellaneous control
functions.
|
IO$_AVAILABLE
|
|
P
|
|
Clear volume valid; make DSA
units available.
|
IO$_CREATE
|
P1,[P2],[P3], [P4],[P5]
|
V
|
IO$M_CREATE IO$M_ACCESS IO$M_DELETE
|
Create a directory entry
or a file.
|
IO$_DEACCESS
|
P1,[P2],[P3], [P4],[P5]
|
V
|
|
Deaccess a file and, if specified,
write final attributes in the file header.
|
IO$_DELETE
|
P1,[P2],[P3],[ P4],[P5]
|
V
|
IO$M_DELETE
|
Remove a directory entry or
file header, or both.
|
IO$_FORMAT
|
P1
|
P
|
|
Set density (RX02 only).
|
IO$_MODIFY
|
P1,[P2],[P3], [P4],[P5]
|
V
|
|
Modify the file attributes or
allocation, or both.
|
IO$_PACKACK
|
|
P
|
|
Update UCB fields if RX02; initialize
volume valid on other devices. Bring DSA units on line.
|
IO$_READLBL2
|
P1,P2,P3
|
L
|
IO$M_DATACHECK3 IO$M_INHRETRY
|
Read logical block.
|
IO$_READPBLK
|
P1,P2,P3
|
P
|
IO$M_DATACHECK IO$M_INHRETRY
IO$M_INHSEEK4
|
Read physical block.5
|
IO$_READVBLK
|
P1,P2,P3
|
V
|
IO$M_DATACHECK IO$M_INHRETRY
|
Read virtual block.
|
IO$_SEARCH
|
P1
|
P
|
|
Search for specified block or
sector (only for TU58).
|
IO$_SEEK
|
P1
|
P
|
|
Seek to specified cylinder.
|
IO$_SENSECHAR
|
|
P
|
|
Sense the device-dependent characteristics
and return them in the I/O status block.
|
IO$_SENSEMODE
|
|
L
|
|
Sense the device-dependent characteristics
and return them in the I/O status block.
|
IO$_SETPRFPATH
|
P1
|
P
|
IO$M_FORCEPTH
|
Specifies a preferred path for
DSA disks.
|
IO$_UNLOAD
|
|
P
|
|
Clear volume valid; make DSA
units available and spin down the volume.
|
IO$_WRITECHECK
|
P1,P2,P3
|
P
|
|
Verify data written to disk by
a previous write QIO.
|
IO$_WRITELBLK
|
P1,P2,P3
|
L
|
IO$M_DATACHECK IO$M_ERASE
IO$M_INHRETRY
|
Write logical block.
|
IO$_WRITEPBLK
|
P1,P2,P3
|
P
|
IO$M_DATACHECK
IO$M_ERASE
IO$M_INHRETRY
IO$M_INHSEEK
IO$M_DELDATA
6
|
Write physical block.
|
IO$_WRITEVBLK
|
P1,P2,P3
|
V
|
IO$M_DATACHECK IO$M_ERASE
IO$M_INHRETRY
|
Write virtual block.
|
The function-dependent arguments for IO$_CREATE, IO$_ACCESS, IO$_DEACCESS, IO$_MODIFY, and IO$_DELETE are as follows:
See ACP-QIO Interface for more information on these functions.
The function-dependent arguments for IO$_READVBLK, IO$_READLBLK, IO$_WRITEVBLK, and IO$_WRITELBLK are as follows:
The function-dependent arguments for IO$_WRITEVBLK, IO$_WRITELBLK, and IO$_WRITEPBLK functions that include the IO$M_ERASE function modifier are as follows:
DSA disk controllers provide controlled, assisted erasing for the IO$M_ERASE modifier (with virtual and logical write functions) only when the erase pattern is all zeros. If a nonzero erase pattern is used, there is a significant performance degradation with these disks. DSA disks do not accept physical QIO transfers. |
The function-dependent arguments for IO$_WRITECHECK, IO$_READPBLK, and IO$_WRITEPBLK are as follows:
On the RB80 and RM80, do not address cylinders 560 and 561. These two cylinders are used for diagnostic testing only. |
The function-dependent argument for IO$_SEARCH is as follows:
P1--The physical disk address where the tape is positioned. The address is expressed as sector, track, and cylinder in the format shown in Starting Physical Address. |
Figure 5 Starting Physical Address |
The function-dependent argument for IO$_SEEK is as follows:
P1--The physical cylinder number where the disk heads are positioned. The address is expressed in the format shown in Physical Cylinder Number Format. |
Figure 6 Physical Cylinder Number Format |
The function-dependent argument for IO$_FORMAT is as follows:
P1--The density at which an RX02 diskette is reformatted (see Set Density). |
Read
The read function
reads data into a specified buffer from disk starting at a specified
disk address.
The operating system provides the following read function codes:
If a read virtual block function is directed to a volume that is mounted foreign, that function is converted to read logical block. If a read virtual block function is directed to a volume that is mounted structured, the volume is handled in the same way as for a file-structured device.
Three function-dependent arguments are used with these codes: P1, P2, and P3. These arguments are described in Disk Function Codes.
The data check function modifier (IO$M_DATACHECK) can be used with all read functions. If this modifier is specified, a data check operation is performed after the read operation completes. A data check operation is also performed if the volume that has been read, or the volume on which the file resides (virtual read) has the characteristic "data check all reads." Furthermore, a data check is performed after a virtual read if the file has the attribute "data check on read." The RX01 and RX02 drivers do not support the data check function.
If IO$M_DATACHECK is specified with a read function code to a TU58, or if the volume read has the characteristic "data check all reads," a read check operation is performed. This alters certain TU58 hardware parameters when the tape is read. (The read threshold in the data recovery circuit is increased; if the tape has any weak spots, errors are detected.)
The data check function modifier to a disk or tape can return five error codes in the I/O status block:
SS$_CTRLERR
|
SS$_DRVERR
|
SS$_MEDOFL
|
SS$_NONEXDRV
|
SS$_NORMAL
|
|
If no errors are detected, the disk or tape data is considered reliable.
The inhibit retry function modifier (IO$M_INHRETRY) can be used with all read functions. If this modifier is specified, all error recovery attempts are inhibited. IO$M_INHRETRY takes precedence over IO$M_DATACHECK. If both are specified and an error occurs, there is no attempt at error recovery and no data check operation is performed. If an error does not occur, the data check operation is performed.
Write
The write function
writes data from a specified buffer to disk starting at a specified
disk address.
The operating system provides the following write function codes:
If a write virtual block function is directed to a volume that is mounted foreign, the function is converted to write logical block. If a write virtual block function is directed to a volume that is mounted structured, the volume is handled in the same way as for a file-structured device.
Three function-dependent arguments are used with these codes: P1, P2, and P3. These arguments are described in Disk Function Codes.
The data check function modifier (IO$M_DATACHECK) can be used with all write operations. If this modifier is specified, a data check operation is performed after the write operation completes. A data check operation is also performed if the volume written, or the volume on which the file resides (virtual write), has the characteristic "data check all writes." Furthermore, a data check is performed after a virtual write if the file has the attribute "data check on write." The RX01 and RX02 drivers do not support the data check function.
If IO$M_DATACHECK is specified with a write function code to a TU58, or if the volume written has the characteristic "data check all writes," a write check operation is performed. The write check verifies data written on the tape. First, the specified data is written on the tape. Then the tape is reversed and the TU58 controller reads the data internally to perform a checksum verification. If the checksum verification is unsuccessful after eight attempts, the write check operation is aborted and an error status is returned.
The inhibit retry function modifier (IO$M_INHRETRY) can be used with all write functions. If that modifier is specified, all error recovery attempts are inhibited. IO$M_INHRETRY takes precedence over IO$M_DATACHECK. If both IO$M_INHRETRY and IO$M_DATACHECK are specified and an error occurs, there is no attempt at error recovery, and no data check operation is performed. If an error does not occur, the data check operation is performed. IO$M_INHRETRY has no effect on DSA disks.
The write deleted data function modifier (IO$M_DELDATA) can be used with the write physical block (IO$_WRITEPBLK) function to the RX02. If this modifier is specified, a deleted data address mark instead of the standard data address mark is written preceding the data. Otherwise, the operation of the IO$_WRITEPBLK function is the same; write data is transferred to the disk. When a successful read operation is performed on this data, the status code SS$_RDDELDATA is returned in the I/O status block rather than the usual SS$_NORMAL status code.
The IO$M_ERASE function modifier can be used with all write function codes to erase a user-selected part of a disk. This modifier propagates an erase pattern through the specified range. Disk Function Codes describes the write function arguments to be used with IO$M_ERASE.
Sense Mode
Sense mode
operations obtain current disk device-dependent characteristics
that are returned to the caller in the second longword of the I/O
status block (see
IOSB Contents for the Sense Mode Function).
The operating system provides the following function codes:
IO$_SENSEMODE is a logical function. IO$_SENSECHAR is a physical I/O function and requires the access privilege necessary to perform physical I/O. No device- or function-dependent arguments are used with either function.
Set Density
The set density
function assigns a new density to an entire RX02 diskette. The diskette
is also reformatted: new data address marks are written (single
or double density) and all data fields are zeroed. Set density is
a physical I/O function and requires the access privilege necessary
to perform physical I/O. The following function code is provided:
IO$_FORMAT |
IO$_FORMAT takes the following function-dependent argument:
P1--The density
at which the diskette is reformatted:
|
The set density operation should not be interrupted before it is completed (about 15 seconds). If the operation is interrupted, the resulting diskette might contain illegal data address marks in both densities. The diskette must then be completely reformatted and the function reissued.
Search
The search function
positions a TU58 magnetic tape to the block specified. Search is
a physical I/O function and requires the access privilege necessary
to perform physical I/O. The operating system provides a single function
code:
IO$_SEARCH |
This function code takes the following function-dependent argument:
P1--Specifies the block where the read/write head will be positioned. The low byte contains the sector number in the range 0 to 127; the high byte contains the track number in the range 0 to 3. |
IO$_SEARCH can save time between read and write operations. For example, nearly 30 seconds are required to completely rewind a tape. If the last read or write operation is near the end of the tape and the next operation is near the beginning of the tape, the search operation can begin after the last operation completes, and the tape will rewind while the process is otherwise occupied. (The search QIO is not completed until the search is completed. Consequently, if a $QIOW system service request is issued, the process will be held up until the search is completed.)
Pack Acknowledge
The
pack acknowledge function sets the volume valid bit for all disk
devices. Pack acknowledge is a physical I/O function and requires
the access privilege to perform physical I/O. If directed to an
RX02 disk, pack acknowledge also determines the diskette density
and updates the device-dependent information returned by $GETDVI
item codes DVI$_CYLINDERS, DVI$_TRACKS, DVI$_SECTORS, DVI$_DEVTYPE, DVI$_CLASS,
and DVI$_MAXBLOCK. If directed to a DSA disk, pack acknowledge also
sends the online packet to the controller. The following function
code is provided:
IO$_PACKACK |
This function code takes no function-dependent arguments.
IO$_PACKACK must be the first function issued when a volume (pack, cartridge, or diskette) is placed in a disk drive. IO$_PACKACK is issued automatically when the DCL commands INITIALIZE or MOUNT are issued.
For DSA disks, the IO$_PACKACK function locks the drive's port selector on the port that initiated the pack acknowledge function.
In addition, the IO$_PACKACK function updates device-dependent information about DSA disks returned by $GETDVI.
Unload
The unload function clears
the volume valid bit for all disk drives, makes DSA disks available,
and issues an unload command to the drive (spins down the volume).
The unload function reverses the function performed by pack acknowledge
(see
Pack Acknowledge). The following
function code is provided:
IO$_UNLOAD |
This function takes no function-dependent arguments.
Available
The available function
clears the volume valid bit for all disk drives; that is, it reverses
the function performed by pack acknowledge (see
Pack Acknowledge). No unload function is issued to
the drive; therefore, those drives capable of spinning down do not
spin down. The following function code is provided:
IO$_AVAILABLE |
This function takes no function-dependent arguments.
Seek
The seek function directs
the read/write heads to move to the cylinder specified in the P1
argument (see Sections
Overlapped Seeks,
Disk Function Codes, and
Physical Cylinder Number Format).
Write Check
The write check function verifies that data was written to
disk correctly. The data to be checked is addressed using physical
disk addressing (sector, track, and cylinder) (see
Starting Physical Address). If the request is directed to a
DSA disk, you must specify a logical block number, even though IO$_WRITECHECK
is a physical I/O function. The following function code is provided:
IO$_WRITECHECK |
A write QIO must be used to write data to disk before you enter this command. IO$_WRITECHECK then reads the same block of data and compares it with the data in the specified buffer. Three function-dependent arguments are used with this code: P1, P2, and P3. These arguments are described in Disk Function Codes.
IO$_WRITECHECK is similar to the IO$M_DATACHECK function modifier for write QIOs, except that IO$_WRITECHECK does not write the data to disk; it is specified after data is written by a separate write QIO. Nonprivileged processes can use the IO$M_DATACHECK modifier with IO$_WRITEVBLK (which does not require access privilege) to determine whether data is written correctly. The RX01 and RX02 drivers do not support the write check function.
The write check function and the data check function modifier to a TU58 can return six error codes in the I/O status block: SS$_NORMAL, SS$_CTRLERR, SS$_DRVERR, SS$_MEDOFL, SS$_NONEXDRV, and SS$_WRTLCK.
Set Preferred Path
The set preferred path function specifies a preferred path
for DSA disks. This includes RA-series disks and disks accessed
through the MSCP server. If a preferred path is specified for a
disk, the MSCP disk class drivers (DUDRIVER and DSDRIVER) use the
path as their first attempt to locate the disk and bring it on line
as a result of a DCL command MOUNT or failover of an already mounted
disk.
In addition, you can initiate failover of a mounted disk to force the disk to the preferred path, or to use load-balancing information for disks accessed through MSCP servers.
The function code is:
IO$_SETPRFPATH |
The following is the function modifier:
IO$M_FORCEPATH--Causes the disk class driver to select the server path with the highest load available rating. |
The P1 parameter contains the address of a counted ASCII string (.ASCIC). This string is the node name of the HSC or system that is the preferred path. The node name must match an existing node that is known to the local node and if the node is a VAX or Alpha system, it must be running the MSCP server. This function does not move the disk to the preferred path.
The PHYS_IO privilege is required for IO$_SETPRFPATH and IO$M_FORCEPATH.
The following example shows the use of IO$_SETPRFPATH:
$assigndef $qiodef $iodef $exitdef dev: .ascid /$254$DUA48:/ chnl: .word 0 node: .ascic /HSC001/ .entry start,0 $assign_s devnam=dev,- chan=chnl blbc r0,done $qiow_s chan=chnl,- func=#IO$_SETPRFPATH,- p1=node done: $exit_s r0 .end startThis updates the local node I/O database to indicate that node HSC001 is the preferred path for DUA48.
Forcing a Path Change
You can move a disk that is already mounted to its preferred
path by specifying the IO$M_FORCEPATH modifier. If a preferred path
has not been specified for a disk that is accessed through the MSCP
server, the IO$M_FORCEPATH function causes the disk class driver
to use load-balancing information to select the server path with
the highest-load-available rating.
IO$M_FORCEPATH does not accept any arguments. If you intend to move a disk to its preferred path, you must specify the preferred path in a separate $QIO function.
The following example shows a use of the IO$M_FORCEPATH function modifier:
$assigndef $qiodef $iodef $exitdef dev: .ascid /$254$DUA197:/ chnl: .word 0 .entry start,0 $assign_s devnam=dev,- chan=chnl blbc r0,done $qiow_s chan=chnl,- func=#$_SETPRFPATH!IO$M_FORCEPATH> done: $exit_s r0 .end startNote that forcing a path change places the disk in mount verification. New I/O requests are suspended until mount verification is complete.
Using IO$_SETPRFPATH with Disks Dual-Pathed
Between HSCs
You can use the IO$_SETPRFPATH and IO$M_FORCEPATH functions
to load balance disks that are dual-pathed between HSCs. The IO$M_FORCEPATH
function initiates failover of the disk on all nodes that have it
mounted and that have a direct path to the HSCs. Because the node
that issues the IO$M_FORCEPATH might not be the first one to attempt
failover of the disk, it is essential that all nodes with direct
connections to the HSCs specify the same preferred path for the
disk. Only one node should issue the IO$M_FORCEPATH request.
Using
IO$_SETPRFPATH with Disks Dual-Pathed Between Systems
You can use IO$M_FORCEPATH to load balance RA-series disks
that are dual-pathed between systems running the MSCP server. Both
serving nodes should specify the same preferred path. To move the
disk between systems, the system that currently has the disk on
line through its local controller should issue the IO$M_FORCEPATH
request. The disk must be mounted on both serving nodes.
Using
IO$_SETPRFPATH with Disks Accessed Through MSCP Servers
You can specify a preferred path for disks that are accessed
through MSCP servers; however, this specification overrides any
load-balancing decisions.
Note that if a disk can be accessed through both HSC and MSCP servers, you need not specify the HSC as a preferred path. HSC paths are always preferred to server paths.
Using IO$M_FORCEPATH without a preferred path causes the disk class driver to move the disk to the server with the highest available capacity.
Using
IO$_SETPRFPATH with Phase I Volume Shadowing
You can specify IO$_SETPRFPATH for shadow set members, but
not for virtual units. IO$M_FORCEPATH is not supported for shadow
set members or virtual units.
Using
IO$_SETPRFPATH with Phase II Volume Shadowing
IO$_SETPRFPATH and IO$M_FORCEPATH are supported for shadow
set members but not for virtual units.
1 V = virtual; L = logical; P = physical.
2 On OpenVMS Alpha, P1 supports a 64-bit address.
3 Not for RX01 and RX02 disks.
4 Not for TU58, TX01, RX02, RB02 and RL02 drives.
5 Not for DSA and SCSI disks.
6 RX02 only.
( Number takes you back )
|
|