HP-UX Reference (11i v1 05/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
v
vxfsio(7) vxfsio(7)
The VX_DIRECT, VX_DSYNC, and VX_UNBUFFERED
caching advisories are maintained on a per-
open instance of a file, so changes made to these advisories by a process do not affect the setting of
these advisories, and therefore I/O operations, by another process.
The
VX_SETCACHE ioctl returns a zero if the caching advisories are successfully set. If the opera-
tion fails, the return value is -1 and the external variable
errno is a general DIAGNOSTIC.
VX_GETCACHE
Get caching advisories in effect for the file. The argument
arg should be a pointer to an int.
The
VX_GETCACHE ioctl returns a zero if the caching advisories are successfully obtained and the
advisories are returned in arg. If the operation fails, the return value is -1 and the external variable
errno is a general DIAGNOSTIC.
VX_SETEXT
Set extent information.
NOTE: VX_SETEXT is available with the HP OnLineJFS product only.
The extent information is set according to the parameters specified by
arg. The argument arg
points to a structure of type vx_ext defined in sys/fs/vx_ioctl.h
. This structure contains
the following members:
ext_size
reserve
a_flags
The ext_size element requests a fixed extent size, in blocks, for the file. If a fixed extent size is
not required, use zero to allow the default allocation policy to be used. Changes to the fixed extent
size made after the file contains indirect blocks have no effect unless all current indirect blocks are
freed via file truncation and/or reservation deallocation.
The reserve element sets the amount of space preallocated to the file (in blocks). If the
reserve
amount is greater than the current reservation, the allocation for the file is increased to match the
reserve amount. If the reserve amount is less than the current reservation, the allocation is
decreased. The allocation is not reduced to less than the current file size.
File reservation cannot be increased beyond the ulimit(2) of the requesting process. However, an
existing reservation will not be trimmed to the requesting process’s ulimit(2). Reservation of space for
existing sparse files will not cause blocks to be allocated to fill in the holes, but will only allocate blocks
after the end of the file. Thus, it is possible to have a larger reservation for a file than blocks in the
file.
The reservation amount is independent of file size since reservation is used to preallocate space for a
file.
The
a_flags element is used to indicate the type of reservation required. The choices are:
VX_NOEXTEND
The file may not be extended once the current reservation is exceeded. The reservation
may be increased if necessary by another invocation of the ioctl, but the file will not be
automatically extended.
VX_TRIM
The reservation for the file is to be trimmed to the current file size upon last close by all
processes that have the file open.
VX_CONTIGUOUS
The reservation must be allocated contiguously (as a single extent). ext_size will
become the fixed extent size for subsequent allocations, but has no affect on this one. The
reservation will fail if the file has gone into indirect extents, unless the amount of space
requested is the same as the indirect extent size. If the contiguous allocation request is
done on an empty file, this will not happen.
VX_ALIGN
Align all new extents on an ext_size boundary relative to the starting block of an allo-
cation unit. If VX_CONTIGUOUS is also set, the single extent allocated during this invo-
cation is not subject to the alignment restriction.
VX_NORESERVE
The reservation is to be made as a non-persistent allocation to the file. The on-disk inode
Section 7−−212 Hewlett-Packard Company − 2 − HP-UX 11i Version 1: September 2005