Document revision date: 15 July 2002 | |
Previous | Contents | Index |
Deaccess file is a virtual I/O function that deaccesses a file and, if specified, writes final attributes in the file header.
The following is the function code:
IO$_DEACCESS takes no function modifiers.
1.6.3.1 Input Parameters
The following are the device- or function-dependent arguments for IO$_DEACCESS:
The following FIB fields are applicable to the IO$_DEACCESS function:
Field | Meaning |
---|---|
FIB$W_FID | File ID of the file being deaccessed. This field can contain a value of 0. If it does not, it must match the file identifier of the accessed file. |
FIB$L_ACL_STATUS | Status of the requested ACL attribute operation, if any. The ACL attributes are included in Table 1-7. If no ACL attributes are given, SS$_NORMAL is returned here. (For Files-11 C/D, this field is always set to SS$_NORMAL.) |
For disk files, if P5 specifies an attribute control list and the file was accessed for a write operation, a write attributes subfunction is performed (see Section 1.3.5). If the file was opened for write, no attributes were specified, and FIB$V_DLOCK was set when the file was accessed, the deaccess lock bit is set in the file header, inhibiting further access to that file.
For disk files, if the truncate enable bit FIB$V_TRUNC is specified in the FIB, a truncate subfunction is performed (see Section 1.3.4).
Finally, the file is closed. Trailer labels are written for a magnetic
tape file that was opened for write.
1.6.4 Modify File
Modify file is a virtual I/O function that modifies the file attributes or allocation of a disk file. The IO$_MODIFY function is not applicable to magnetic tape; that is, the function returns success, but no action is performed.
The following is the function code:
The following is the function modifier:
The following are the device- or function-dependent arguments for IO$_MODIFY:
The following FIB fields are applicable to the IO$_MODIFY function:
Field | Subfields | Meaning |
---|---|---|
FIB$L_ACCTL | Specifies field values that control access to the file. The following bit is applicable to the IO$_MODIFY function: | |
FIB$V_WRITETHRU | Specifies that the file header is to be written back to the disk. If not specified and the file is currently open, writing of the file header can be deferred to some later time. | |
FIB$W_VERLIMIT | If a nonzero number, specifies the version limit for the file. | |
FIB$L_ACL_STATUS | Status of the requested ACL attribute operation, if any. The ACL attributes are included in Table 1-7. If no ACL attributes are given, SS$_NORMAL is returned here. |
If a nonzero directory ID is specified in FIB$W_DID, a lookup subfunction is executed (see Section 1.3.1). If a nonzero version limit is specified in FIB$W_VERLIMIT and the directory entry found is the latest version of that file, the version limit is set to the value specified.
If P5 specifies an attribute list, a write attributes subfunction is performed (see Section 1.3.5).
The file can be either extended or truncated. If FIB$V_EXTEND is
specified in the FIB, an extend subfunction is performed (see
Section 1.3.3). If FIB$V_TRUNC is specified in the FIB, a truncate
subfunction is performed (see Section 1.3.4). Extend and truncate
operations cannot be performed at the same time.
1.6.5 Delete File
Delete file is a virtual I/O function that removes a directory entry or file header from a disk volume.
The following is the function code:
The following is the function modifier:
The following are the device- or function-dependent arguments for IO$_DELETE:
The following FIB fields are applicable to the IO$_DELETE function:
Field | Subfields | Meaning |
---|---|---|
FIB$L_ACCTL | Specifies field values that control access to the file. The following bit is applicable to the IO$_DELETE function. | |
FIB$V_NOLOCK (Alpha only) | Allows the caller to mark a file for delete that is currently open for write access. When the file is closed, it is automatically deleted. The file cannot be accessed by new callers after it has been marked for delete. | |
FIB$V_WRITETHRU | Specifies that the file header is to be written back to the disk. If not specified and the file is currently open, writing of the file header can be deferred to some later time. | |
FIB$W_DID | Contains the file identifier of the directory file. This field must be a nonzero number. | |
FIB$W_FID | Specifies the file identification to be deleted. |
If a nonzero directory ID is specified in FIB$W_DID, a lookup subfunction is performed (see Section 1.3.1). The file name located is removed from the directory.
If the function modifier IO$M_DELETE is specified, the file is marked
for deletion. If the file is not currently open, it is deleted
immediately. If the file is open, it is deleted when the last accessor
closes it.
1.6.6 Movefile Subfunction
The movefile subfunction permits you to move the contents of a file, or part of the contents of a file, to a new disk location. This subfunction can, for example, form the basis of a disk defragmentation application.
You can disable movefile operations on specific user files by
specifying the /NOMOVE qualifier on the SET FILE command. Use the
DIRECTORY/FULL and the DUMP/HEADER commands to find out if movefile
operations are disabled on a file.
1.6.6.1 Calling the Movefile Subfunction
A program can invoke a movefile subfunction by issuing a QIO request
using the function code IO$_MODIFY and the function modifier
IO$M_MOVEFILE. This section describes the various input parameters that
control the processing of movefile operations together with an
operational description.
1.6.6.2 Input Parameters
Table 1-13 lists the FIB fields that control the processing of a movefile subfunction.
Field | Subfields | Meaning |
---|---|---|
FIB$L_ACCTL | Movefile control flag. The following flags are applicable: | |
FIB$V_NOVERIFY | Inhibits comparison of the moved blocks. If this flag is clear, the movefile operation verifies that the operation was carried out correctly by comparing the moved blocks to the original blocks. | |
FIB$V_CHANGE_VOL |
Enables the movefile operation to move blocks from one volume to
another within a volume set.
The movefile operation clears this flag if the specified file is a directory. |
|
FIB$W_FID | Specifies the file identification of the file to be moved. | |
FIB$W_EXCTL | Movefile control flags. The following flags apply to the movefile operation. All other FIB$W_EXCTL flags must be clear. | |
FIB$V_ALCON |
Specifies that the movefile operation must allocate contiguous disk
space to the moved blocks. If the necessary contiguous space is not
available, the movefile operation fails.
The movefile operation sets this flag if the file was previously marked as contiguous. |
|
FIB$V_ALCONB |
Specifies that the movefile operation should attempt to allocate
contiguous disk space to the moved blocks. That is, if the movefile
operation cannot allocate contiguous space to all the moved blocks, it
allocates contiguous space to as many of the blocks as possible.
The movefile operation sets this flag if the file was previously marked as contiguous best try. |
|
FIB$V_FILCON |
Specifies that the entire file must be made contiguous. Do not set this
flag without also setting the FIB$V_ALCON flag.
If the FIB$V_FILCON flag is set, and either the FIB$V_ALCON flag is clear or the file would not be made contiguous by moving the specified virtual blocks, the movefile operation fails. The movefile operation sets this flag if the file was previously marked as contiguous. |
|
FIB$V_NOPLACE |
Specifies that placement information will not be recorded in the file
header.
If this flag is clear and you specify exact placement for the moved blocks, placement information for those blocks will be recorded in the file header. If this flag is set, the placement information will not be recorded. You specify exact placement through the FIB$V_EXACT, FIB$C_LBN, and FIB$L_LOC_ADDR fields. |
|
FIB$B_ALOPTS | Flags that control the placement of the allocated blocks. Currently, only the FIB$V_EXACT flag applies to the movefile operation. All other FIB$B_ALOPTS flags must be clear. The following flags are applicable: | |
FIB$V_EXACT | Set to require exact placement. If this flag is set and the specified blocks are not available, the movefile operation fails. | |
FIB$B_ALALIGN | Contains the interpretation mode of the allocation field (FIB$W_ALLOC). You can specify a field value of 0 or you can specify the symbolic value FIB$C_LBN. If you specify zero, the allocation field is ignored. | |
FIB$W_ALLOC | Contains the desired location of the blocks being allocated. Interpretation of the field is controlled by the FIB$B_ALALIGN field. The following subfields are defined: | |
FIB$B_LOC_RVN | Specifies the relative volume number (RVN) of the volume to which the blocks are moved. Do not specify a value for this field unless you have set the FIB$V_CHANGE_VOL flag. | |
FIB$L_LOC_ADDR | If the FIB$C_LBN and FIB$V_EXACT flags are set, specifies the starting logical address to which the blocks are moved. | |
FIB$L_MOV_SVBN |
Specifies the virtual block number (VBN) of the first block to be moved.
The starting VBN must correspond to the first block of a disk cluster. The value must be greater than 0 and it must not exceed the number of virtual blocks allocated to the file. If you specify an invalid value, the movefile operation fails. |
|
FIB$L_MOV_VBNCNT |
Specifies the number of consecutive virtual blocks to be moved.
This value must be a multiple of the disk cluster size, and it must not exceed the difference between the greatest VBN allocated to the file and the FIB$L_MOV_SVBN value. If you specify a value of 0, the movefile operation moves all the virtual blocks between the FIB$L_MOV_SVBN value and the greatest VBN. If you specify an invalid value, the movefile operation fails. |
A program can perform a movefile operation on a file if the following conditions are met:
The movefile operation moves a specified number of consecutive virtual blocks to new logical blocks on disk, beginning with the virtual block specified in the FIB$L_SVBN field.
The number of blocks moved is specified in the FIB$L_VBNCNT field. To move an entire file, specify FIB$L_VBNCNT as 0 and FIB$L_SVBN as 1.
To specify a starting logical block for the moved blocks, specify the logical block address in the FIB$L_LOC_ADDR subfield and set the FIB$C_LBN and the FIB$V_EXACT flags.
To move the blocks to another volume, or move blocks that span more than one volume, set the FIB$V_CHANGE_VOL flag of the FIB$L_ACCTL field. Use the FIB$B_LOC_RVN subfield of the FIB$W_ALLOC field to specify the volume to which the blocks are moved. If you do not specify a volume, the blocks are moved to the volume containing the first virtual block. Note that you cannot move blocks of a directory file to another volume.
If the file was previously marked as contiguous, the movefile operation sets the FIB$V_ALCON, FIB$V_ALCONB, and FIB$V_FILCON flags. This ensures that a contiguous file is not fragmented by a movefile operation.
For virtual blocks beyond the file's highwater mark, the movefile
operation allocates new logical blocks but does not copy the contents.
The position of the file's highwater mark remains unchanged.
1.6.7 Mount
On VAX and Alpha systems, mount is a virtual I/O function that informs the ACP when a disk or magnetic tape volume is mounted. MOUNT privilege is required.
IO$_MOUNT takes no arguments or function modifiers. This function is
part of the volume mounting operation only, and it is not meant for
general use. Most of the actual processing is performed by the MOUNT
command or the Mount Volume ($MOUNT) system service.
1.6.8 ACP Control
ACP Control is a virtual I/O function that performs miscellaneous control functions, depending on the arguments specified.
The following is the function code:
The following is the function modifier:
The following are the device- or function-dependent arguments for IO$_ACPCONTROL:
Table 1-14 lists FIB fields that control the processing of the IO$_ACPCONTROL function.
Field | Subfields | Meaning |
---|---|---|
FIB$W_CNTRLFUNC | Specifies the control function to be performed. This field overlays FIB$W_EXCTL. | |
FIB$L_CNTRLVAL 1 | Specifies additional function-dependent data. This field overlays FIB$L_EXSZ. | |
FIB$L_ACL_STATUS | Status of the requested ACL attribute operation, if any. The ACL attributes are included in Table 1-7. If no ACL attributes are given, SS$_NORMAL is returned here. For Files-11 C/D, this field is always set to SS$_NORMAL. | |
FIB$L_STATUS 1 | Alternate access status. The following bits are supported: | |
FIB$V_ALT_REQ | Set to indicate whether the alternate access bit is required for the current operation. If not set, the alternate access bit is optional. | |
FIB$V_ALT_GRANTED | If FIB$V_ALT_REQ = 0 and the alternate access check succeeded, the FIB bit returned from the file system is set. | |
FIB$L_ALT_ACCESS 1 | A 32-bit mask that represents an access mask to check against file protection; for example, to open a file for read and to check whether it can be deleted or not. The mask has the same configuration as the standard protection mask. |
Table 1-15 lists the FIB field applicable to magnetic tape operations.
Field | Subfields | Meaning |
---|---|---|
FIB$W_CNTRLFUNC | Several ACP control functions are used for magnetic tape positioning. These functions are specified by supplying a FIB with P1 containing the FIB descriptor address. Modifiers and parameters P2, P3, and P4 are not allowed. These functions clear serious exceptions in magnetic tape drivers. The following control functions can be specified to control magnetic tape positioning: | |
FIB$C_REWINDFIL | Rewind to beginning-of-file. | |
FIB$C_REWINDVOL | Rewind to beginning-of-volume set. | |
FIB$C_POSEND | Position to end-of-volume set. | |
FIB$C_NEXTVOL | Force next volume. | |
FIB$C_SPACE | Space n blocks forward or backward. The FIB$L_CNTRLVAL field specifies the number of magnetic tape blocks to space forward if positive or to space backward if negative. | |
FIB$C_CLSEREXCP | If set, clears the serious exception in the magnetic tape driver (see FIB$C_USEREOT in Section 1.6.1 and Section 1.6.2). If writing, allows you to write data blocks beyond the EOT marker, which can result in the magnetic tape not conforming to the ANSI standard for magnetic tapes (see ANSI Standard X3.27--1978). If reading, allows you to handle the move to the next volume or to stop reading the tape. Do not attempt to read past EOV. |
Several ACP control functions are available for disk volume control. The following function does not use parameters P2, P3, and P4:
The FIB$W_CNTRLFUNC field of the FIB specifies the following miscellaneous control functions (with no modifier on the IO$_ACPCONTROL function code). These functions use no other parameters.
FIB$C_REMAP | Remap a file. The file window for the file open on the user's channel is remapped so that it maps the entire file. |
FIB$C_LOCK_VOL |
Allocation lock the volume. Operations that change the file structure,
such as file creation, deletion, extension, and deaccess, are not
permitted. If such requests are queued to the file system for an
allocation-locked volume, they are not processed until the
FIB$C_UNLK_VOL function is issued to unlock the volume.
To issue the FIB$C_LOCK_VOL function, you must have either a system UIC or SYSPRV privilege, or be the owner of the volume. |
FIB$C_UNLK_VOL | Unlock the volume. Cancels FIB$C_LOCK_VOL. To issue this function, you must have either a system UIC or SYSPRV privilege, or be the owner of the volume. |
Previous | Next | Contents | Index |
privacy and legal statement | ||
6136PRO_004.HTML |