fsckpt_opts_create (3)


fsckpt_opts_create - create a Storage Checkpoint associated with a file system handle


#include <fsckpt.h>

int fsckpt_opts_create(void **fshandle, char *ckptname, int flags, struct c_create_opts *options);




fsckpt_opts_create() creates a Storage Checkpoint on a file system. The file system is specified by the fshandle argument, which is a NULL terminated array of size one of a previously opened file system handle. When fsckpt_opts_create() completes, a Storage Checkpoint named ckptname is created on the file system.

Checkpoints are created atomically. This means that before a Storage Checkpoint is created, the file system is brought into a stable state where all data is written to disk. The file system is then frozen, blocking all subsequent user requests. The Storage Checkpoint creation is then initiated on a stable file system image.

The flags argument specifies the creation type and policies to be used in the case of ENOSPC conditions. The following flags are defined:
0 ENOSPC errors are passed to the application. No action is taken on the Storage Checkpoint.
CC_REMOVE Creates a Storage Checkpoint which may self-destruct under ENOSPC conditions. See the fsckpt_cntl(3) man page for more information.
CC_NODATA Creates a nodata Storage Checkpoint. If there is an older Storage Checkpoint that is not a nodata Storage Checkpoint, a delayed nodata Storage Checkpoint is created (see fsckpt_cntl(3) for more information).
CC_NOMOUNT Creates a nomount Storage Checkpoint. See the fsckpt_cntl(3) man page for more information.
The c_create_opts options structure is defined in the header file fsckpt.h and contains other optional arguments used in Storage Checkpoint creation. The structure allows the application to pass a signature field which will be embedded in the new Storage Checkpoint and to specify the data and meta-data policies to be used during Storage Checkpoint allocations. Any unused option fields should be zero filled.


fsckpt_opts_create() returns zero on success, non-zero on failure.


EACCES User does not have permission to perform the operation. Only privileged users can create Storage Checkpoints.
EEXIST The Storage Checkpoint name ckptname already exists in the file system Storage Checkpoint name space.
EINVAL The function is being used incorrectly, or the arguments to the function could not be validated. This may occur when an application tries to use an fshandle that was not created by the same process.
EIO An I/O error occurred on the device. The Storage Checkpoint could not be loaded.
ENOSPC The file system does not have enough disk space to create the Storage Checkpoint.
ENOSYS The system does not have a valid license to perform the operation.
ENOTSUP The number of fshandles to operate on is not currently supported.
EROFS The file system is mounted as read-only; no updates are allowed on the file system and the Storage Checkpoint cannot be modified.


fsckptadm(1M), fsckpt_cntl(3), fsckpt_create(3), fsckpt_createall(3), fsckpt_opts_createall(3), fsckpt_fsopen(3), fsckpt_intro(3)

VxFS 5.1 SP1 fsckpt_opts_create (3)