Previous  |  Next  >  
Product: File System Manual Pages for Storage Foundation   
Manual: Library Functions (3)   

fsckpt_setcontext

NAME

fsckpt_setcontext - set a process in a Storage Checkpoint context to another Storage Checkpoint context

SYNOPSIS


#include <fsckpt.h>
int fsckpt_setcontext(void *fshandle, char *ckptname);

AVAILABILITY

VRTSvxfs

DESCRIPTION

fsckpt_setcontext() sets a process in Storage Checkpoint context to a context specified by ckptname. When this function returns, all accesses to files on the mounted file system represented by fshandle are redirected to the Storage Checkpoint ckptname. To access these files in-context however, the application must cross the mount point via a chdir (2) call first.

If the file system specified by fshandle has sub-mounts, the process in-context will not see them nor traverse these mount points when operating in the Storage Checkpoint.

Any existing open file descriptors are not redirected until they are closed and reopened.

Only one context is allowed per process. Any attempts to set additional contexts for this or any other Storage Checkpoint will fail.

Checkpoint contexts are not allowed on processes using chroot().

Checkpoint contexts are inherited by child processes after a fork() system call, however the fshandle is not. A child process trying to establish its own context (to this or any other Storage Checkpoint) can do so by simply re-issuing its own fsckpt_fsopen() or fsckpt_setcontext() calls.

RETURN VALUES

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

ERRORS

EBUSY

Checkpoint is mounted. No contexts are allowed on mounted Storage Checkpoints. This error is also returned if the current process is already in context.

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.

ENOENT

The specified Storage Checkpoint ckptname does not exist.

EPERM

The process has issued a chroot() system call. Checkpoint contexts and chroot() system calls are mutually exclusive.

SEE ALSO

fsckptadm (1M), chdir(2), chroot(2), fork(2), fsckpt_create (3), fsckpt_createall (3), fsckpt_fsopen (3), fsckpt_intro (3)
 ^ Return to Top Previous  |  Next  >  
Product: File System Manual Pages for Storage Foundation  
Manual: Library Functions (3)  
VERITAS Software Corporation
www.veritas.com