VSON(2) — HP-UX
Series 500 Only
NAME
vson, vsoff − advise OS about backing store devices
SYNOPSIS
#include <sys/ems.h> int vson(pathname, size, q);
int size, q;
char ∗pathname; int vsoff(index, force);
int index, force;
DESCRIPTION
Vson is used to make the block special file pathname available for use by the system as a backing store device for whatever form of backing store is needed by the system. The call returns an id by which the backing store device may be referenced in subsequent vsoff or vsadv(2) calls. Multiple vson calls for the same device will return the same id (here "same device" means identical devno - major and minor - and not necessarily the same file name).
Pathname specifies a block special device file, which may or may not contain a mounted file system, and which must be a CS-80 device. If device does not contain a file system (i.e. an "empty" disk), size specifies the available backing storage space (in blocks) to be made available (the storage space is assumed to start at block 0 in this case). If size is set to −1 and the device does not contain a file system, the whole block special device will be used for backing store.
Q is a quality (i.e. performance) factor for the device. It is used by the system in load balancing decisions. Higher values suggest secondary choices for backing store devices. There is no inherent significance to the value of q other than its value relative to the q factor of the other devices in the list. This parameter may be ignored on some implementations.
Vsoff is used to remove a device from the list of backing store devices available to the system. Index is the value returned by vson when the device was added to the list.
If force is not set (i.e. is 0) the system attempts to "gracefully" eliminate backing store usage of device by migrating backing store space onto other devices. If force is set (if, for instance, the device has failed) no attempt is made to salvage images stored on the disk. Processes with images on the device will, in all probability, be rather ungracefully terminated in the near future (i.e. when the images are required).
Only the super-user may add or remove backing store devices. A normal user may call vson to get the id for a device already known to the system as a backing store device (for subsequent use in a vsadv(2) call).
RETURN VALUES
Upon successful completion, vson returns the index for the device and vsoff returns 0. If there is an error, a value of −1 is returned and errno is set to indicate the error.
AUTHOR
Vson was developed by the Hewlett-Packard Company.
SEE ALSO
ems(2), memallc(2), swapon(2), vsadv(2)
Hewlett-Packard Company — Version B.1, April 12, 1993