fsckpt_create - create a Storage Checkpoint associated with a file system handle
int fsckpt_create(void *fshandle, char *ckptname, int flags);
fsckpt_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_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.
fsckpt_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_createall(3), fsckpt_fsopen(3), fsckpt_intro(3)