Document revision date: 15 July 2002
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS System Services Reference Manual


Previous Contents Index

A blank disk or a diskette with an incorrect format can sometimes cause a fatal drive error. Such a diskette can be initialized successfully by specifying the INIT$_DENSITY item code to format the diskette.

Required Access or Privileges

To initialize a particular volume, the caller must either have volume protection (VOLPRO) privilege or the volume must be one of the following:

Required Quota

None

Related Services

$ALLOC, $ASSIGN, $BRKTHRU, $BRKTHRUW, $CANCEL, $CREMBX, $DALLOC, $DASSGN, $DELMBX, $DEVICE_SCAN, $DISMOU, $GETDVI, $GETDVIW, $GETMSG, $GETQUI, $GETQUIW, $MOUNT, $PUTMSG, $QIO, $QIOW, $SET_SECURITY, $SNDERR, $SNDJBC, $SNDJBCW, $SNDOPR


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_ACCVIO The item list or an address specified in the item list cannot be accessed.
SS$_BADPARAM A buffer length of 0 was specified with a nonzero item code or an illegal item code was specified.
SS$_IVSSRQ A concurrent call to SYS$INIT_VOL is already active for the process.
SS$_NOPRIV The caller does not have sufficient privilege to initialize the volume.
SS$_NOSUCHDEV The specified device does not exist on the host system.
   
The $INIT_VOL service can also return the following condition values, which are specific to the Initialize Volume utility:
INIT$_ALLOCFAIL Index file allocation failure.
INIT$_BADACCESSED Value for INIT$_ACCESSED item code out of range.
INIT$_BADBLOCKS Invalid syntax in bad block list.
INIT$_BADCLUSTER Value for INIT$_CLUSTER_SIZE item code out of range.
INIT$_BADDENS Invalid value for INIT$_DENSITY item code.
INIT$_BADDIRECTORIES Value for INIT$_DIRECTORIES item code out of range.
INIT$_BADEXTENSION Value for INIT$_EXTENSION item code out of range.
INIT$_BADHEADERS Value for INIT$_HEADER item code out of range.
INIT$_BADMAXFILES Value for INIT$_MAXFILES item code out of range.
INIT$_BADOWNID Invalid value for owner ID.
INIT$_BADRANGE Bad block address not on volume.
INIT$_BADVOL1 Bad VOL1 ANSI label.
INIT$_BADVOLACC Invalid value for INIT$_LABEL_ACCESS item code.
INIT$_BADVOLLBL Invalid value for ANSI tape volume label.
INIT$_BADWINDOWS Value for INIT$_WINDOWS item code out of range.
INIT$_BLKZERO Block 0 is bad---volume not bootable.
INIT$_CLUSTER Unsuitable cluster factor.
INIT$_CONFQUAL Conflicting options were specified.
INIT$_DIAGPACK Disk is a diagnostic pack.
INIT$_ERASEFAIL Volume not completely erased.
INIT$_FACTBAD Cannot read factory bad block data.
INIT$_ILLOPT Item codes not appropriate for the device were specified.
INIT$_INDEX Invalid index file position.
INIT$_LARGECNT Disk too large to be supported.
INIT$_MAXBAD Bad block table overflow.
INIT$_MTLBLLONG Magnetic tape label specified is longer than 6 characters.
INIT$_MTLBLNONA Magnetic tape label specified contains non-ANSI "a" characters.
INIT$_NOBADDATA Bad block data not found on volume.
INIT$_NONLOCAL Device is not a local device.
INIT$_NOTRAN Logical name cannot be translated.
INIT$_NOTSTRUC1 Options not available with Files-11 On-Disk Structure Level 1.
INIT$_UNKDEV Unknown device type.


$IO_CLEANUP (Alpha Only)

On Alpha systems, returns all resources allocated by $IO_SETUP.

This service accepts 64-bit addresses.


Format

SYS$IO_CLEANUP fandle


C Prototype

int sys$io_cleanup (unsigned __int64 fandl);


Arguments

fandle


OpenVMS usage: fandle
type: 64-bit integer (unsigned)
access: read only
mechanism: by value

A fandle, passed by value, returned by a previous call to $IO_SETUP.

Description

The Clean Up Fast I/O system service returns various internal resources allocated by the $IO_SETUP system service. Buffer objects passed to $IO_SETUP cannot be deleted until every $IO_SETUP call has had a corresponding $IO_CLEANUP call.

Image rundown executes any required $IO_CLEANUP operations on behalf of the process.

Required Privileges

None

Required Quota

None

Related Services

$IO_PERFORM(W), $IO_SETUP


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_BADFANDLE Argument was not a valid fandle.
SS$_BUSY The fandle cannot be cleaned up because an I/O is in progress. Reissue the call to $IO_CLEANUP after the I/O has finished.

$IO_FASTPATH (Alpha Only)

Provides the ability to control the set of Fast Path devices and their assignment to CPUs enabled for Fast Path use.

Format

SYS$IO_FASTPATH efn ,cpu_mask ,function_code


C Prototype

int sys$io_fastpath (unsigned int efn, UINT32_PQ cpu_mask, unsigned int function_code);


Arguments

efn


OpenVMS usage: integer
type: longword bit mask (unsigned)
access: read
mechanism: by value

Number of the event flag to be set when the IO_FASTPATH(W) operation completes. The efn argument is a longword containing the number of the event flag.

cpu_mask


OpenVMS usage: integer
type: longword bit mask (unsigned)
access: read
mechanism: by 32- or 64-bit reference

The cpu_mask argument specifies a set of CPUs to be operated upon.

function_code


OpenVMS usage: integer
type: longword (unsigned)
access: read
mechanism: by value

The function_code specifies the operation to be performed. Note that there is currently only one function code:

FP$K_BALANCE_PORTS - Distribute Fast Path ports across CPUs.


Description

The $IO_FASTPATH system service performs operations on the set of Fast Path devices and CPUs enabled for Fast Path use. The $IO_FASTPATHW system service completes synchronously. That is, it returns after the operation is complete.

The FP$K_BALANCE_PORTS function code specifies that the system service is to distribute the set of system assignable Fast Path ports across the intersection of a caller-supplied set of candidate CPUs (cpu_mask) and the current set of usable CPUs. Usable CPUs are the intersection of the set of CPUs both enabled for Fast Path use by IO$_PREFERRED_CPUS and whose current state is RUN.

The service does this by:

  1. Eliminating all CPUs not in the set of usable CPUs from the set of candidate CPUs.
  2. Restoring any user assigned ports that are not currently on the user's preferred CPU to the user's preferred CPU, if that CPU is in the set of usable CPUs.
  3. Spreading the system assignable Fast Path ports, and any Fast Path ports whose user preferred CPU is unavailable, evenly across the set of usable candidate CPUs.
    If the primary CPU is in the set of usable candidate CPUs, the distribution will be biased against the primary CPU in that a port will only be assigned to the primary after ports have been assigned to each of the other usable candidate CPUs.

Required Access or Privileges

PHYS_IO

Required Quota

None.

Related Services

$GETDVI, $QIO


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_BADPARAM Unsupported value for cpu_mask.
SS$_ILLIOFUNC Illegal function code.

$IO_FASTPATHW (Alpha Only)

Performs operations on the set of Fast Path devices and CPUs enabled for Fast Path use.

The $IO_FASTPATHW system service is functionally equivalent to the $IO_FASTPATH service except that it completes synchronously. That is, it returns after the operation is complete.


Format

SYS$IO_FASTPATHW efn ,cpu_mask ,function_code


C Prototype

int sys$io_fastpathw (unsigned int efn, UINT32_PQ cpu_mask, unsigned int function_code);


$IO_PERFORM (Alpha Only)

On Alpha systems, starts the Fast I/O operation. The $IO_PERFORM service completes asynchronously. For synchronous completion, use the Perform Fast I/O and Wait ($IO_PERFORMW) service.

This service accepts 64-bit addresses.


Format

SYS$IO_PERFORM fandle ,chan ,iosadr ,bufadr ,buflen ,devdata


C Prototype

int sys$io_perform (unsigned __int64 fandl, unsigned short int chan, struct _iosa *iosadr, void *bufadr, unsigned __int64 buflen, unsigned __int64 devdata);


Arguments

fandle


OpenVMS usage: fandle
type: 64-bit integer (unsigned)
access: read only
mechanism: by value

A fandle returned by a previous call to $IO_SETUP.

chan


OpenVMS usage: channel
type: word (unsigned)
access: read
mechanism: by value

Software I/O channel number.

iosadr


OpenVMS usage: address
type: address
access: read only
mechanism: by value

Address of the I/O Status Area (IOSA). This value cannot be 0; that is, an IOSA is required. The iosadr must be aligned to a quadword boundary.

bufadr


OpenVMS usage: char_string
type: address
access: read only
mechanism: by value

The process buffer address. Must be aligned on a 512-byte boundary.

buflen


OpenVMS usage: byte count
type: 64-bit integer
access: read only
mechanism: by value

The byte count for the I/O. The buflen argument must be a multiple of 512 bytes. Drivers have further limitations on the maximum size of an I/O request.

devdata


OpenVMS usage: address
type: pointer or integer
access: read only
mechanism: by value

A hardware integer passed unchanged to the driver. For disk devices, this is the media address for the transfer; that is, the virtual block number (VBN) for virtual I/O functions or the logical block number (LBN) for logical I/O functions. This argument is ignored for tape devices.

For drivers with complex parameters, devdata would be the address of a descriptor or buffer specific to the device and function and would be documented with the driver.


Description

The Perform Fast I/O system service initiates an I/O operation on the channel number specified by the chan argument. The bytes specified by the buflen argument are transferred between the location (devdata) on the device driver and the user's buffer starting at the process buffer address (bufadr). The byte count is read or written according to the function code previously specified in the $IO_SETUP call associated with the fandle argument.

Upon completion, the I/O status is written to the IOSA starting at the location specified by iosadr, and an AST is delivered to the astadr address supplied in the $IO_SETUP call associated with fandle. The IOSA address is passed to the AST as the AST parameter.

Required Privileges

None

Required Quota

None

Related Services

$IO_CLEANUP, $IO_SETUP, $IO_PERFORMW


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_BADBUFADR The data buffer does not reside within the bounds of the data buffer object for the fandle.
SS$_BADIOSADR The IOSA does not reside within the bounds of the IOSA buffer object for this fandle.
SS$_FANDLEBUSY The operation using this fandle is already in progress.
SS$_IVCHAN An invalid channel number was specified; that is, a channel number of 0 or a number larger than the number of channels available.
SS$_UNALIGNED The buffer specified by bufadr or iosadr is not properly aligned.
SS$_WRONGACMODE The request is invalid because the fandle was created from a more privileged access mode, or the channel was assigned from a more privileged access mode.

Condition Values Returned in the I/O Status Block

1
The OpenVMS I/O User's Reference Manual lists these device-specific condition values for each device.

$IO_PERFORMW (Alpha Only)

On Alpha systems, starts a Fast I/O operation. The $IO_PERFORMW service completes synchronously; that is, it returns to the caller after performing the Fast I/O operation.

In all other respects, $IO_PERFORMW is identical to $IO_PERFORM. For all other information about the IO_PERFORMW service, refer to the description of $IO_PERFORM in this manual.


Format

SYS$IO_PERFORMW fandle ,chan ,iosadr ,bufadr ,buflen ,devdata


C Prototype

int sys$io_performw (unsigned __int64 fandl, unsigned short int chan, struct _iosa *iosadr, void *bufadr, unsigned __int64 buflen, unsigned __int64 devdata);


$IO_SETUP (Alpha Only)

On Alpha systems, allocates resources for Fast I/O.

This service accepts 64-bit addresses.


Format

SYS$IO_SETUP func ,bufobj ,iosobj ,astadr ,flags ,return_fandle


C Prototype

int sys$io_setup (unsigned int func, struct _generic_64 *bufobj, struct _generic_64 *iosobj, void (*astadr)(struct _iosa *), unsigned int flags, unsigned __int64 *return_fandle);


Arguments

func


OpenVMS usage: function_code
type: longword
access: read only
mechanism: by value

I/O function code. Must be one of the following:

Various function modifiers are supported, depending on the device and driver. Disk drivers support IO$M_NOVCACHE and IO$M_DATACHECK. Some tape devices support IO$M_REVERSE. Illegal modifiers are detected by the $IO_PERFORM(W) service.

bufobj


OpenVMS usage: buffer object
type: quadword (unsigned)
access: read only
mechanism: by 32- or 64-bit reference

Handle describing the buffer object that contains the user's buffer. This identifier cannot be 0.

iosobj


OpenVMS usage: object handle
type: vector longword (unsigned)
access: read only
mechanism: by 32- or 64-bit reference

Buffer object handle describing the buffer object that contains the I/O Status Area (IOSA). This might or might not be the same identifier as the bufobj argument. This identifier cannot be 0.

astadr


OpenVMS usage: ast_procedure
type: procedure value
access: read only
mechanism: by 32- or 64-bit reference

Completion AST routine address (0, if none). There is no AST parameter argument. When the AST routine is called, the AST parameter will be the address of the IOSA for the operation. Applications can store data in the IOSA at offset IOSA$IH_CONTEXT.

flags


OpenVMS usage: mask_longword
type: 64-bit integer (unsigned)
access: read only
mechanism: by value

Flag mask. The flags argument is a bit vector in which each bit corresponds to a flag. Flags are defined in the module IOSADEF.

The following table describes the flags that are valid for the $IO_SETUP service:
Flag Description
FIO$M_EXPEDITE This is a high priority I/O; that is, it is to be given preferential treatment by the I/O subsystem. Use of this bit requires ALTPRI or PHY_IO privilege.
FIO$M_AST_NOFLOAT The AST procedure does not use, or call any procedure that uses, any floating-point registers. This is a performance option. If set, AST delivery will neither save nor restore floating-point registers. Caution: Use of floating-point registers when FIO$M_AST_NOFLOAT has been specified can cause unpredictable, difficult to detect, error conditions.

All other bits in the flags argument are reserved for future use by Compaq and should be specified as 0.

return_fandle


OpenVMS usage: fandle
type: 64-bit integer (unsigned)
access: write only
mechanism: by 32- or 64-bit reference

Address of an aligned quadword to receive the fandle for this I/O operation.

Description

The Set Up Fast I/O system service allocates and initializes a number of internal objects based on the parameters supplied. Because these objects are then ready for use when a subsequent $IO_PERFORM or $IO_PERFORMW is issued, the I/O operation will require less CPU time and fewer multiprocessor steps.

Required Privileges

If you use the flags argument FIO$M_EXPEDITE, a process must have ALTPRI or PHY_IO privilege.

Required Quota

Byte count

Related Services

$IO_CLEANUP, $IO_PERFORM(W)


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_ACCVIO The fandle does not have 8 bytes of writability, or the two buffer objects do not have 8 bytes of readability each.
SS$_INSFMEM There is no pool available from which to create a fandle vector, or the fandle vector is already full and an attempted expansion failed.
SS$_ILLIOFUNC The function code is not valid.
SS$_ILLMODIFIER The I/O function modifier is not permitted.
SS$_UNALIGNED The I/O Status Area (IOSA) or data buffer is not aligned on a quadword boundary.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
4527PRO_076.HTML