usam_mig_cancel_stage_req - Cancels a foreign media stage
cc [ flag ... ] file ... -L/opt/SUNWsamfs/lib -lsamut [library ... ]
int usam_mig_cancel_stage_req(tp_stage_t *stage_req );
usam_mig_cancel_stage_req() cancels a stage request from the
foreign data migration program, written by the integrator.
The stager daemon, sam-stagerd, is expected to cancel the
stage request on its worklist. Only the inode and fseq can
be used to find the stage request to be canceled. stage_req
is a pointer to a tp_api structure into which information is
placed regarding the offset, size, position, etc. of the
data file. The contents of the structure pointed to by
stage_req include the following members:
offset_t offset; /* Offset from beginning of the file */
offset_t size; /* Size of the file to stage */
long long position; /* The position field from the archive info in the inode */
ino_t inode; /* Inode number from the file system */
vsn_t space; /* VSN field from the archive information in the inode */
equ_t fseq; /* Equipment number of family set in the inode */
char media_type; /* 2 character media type for the foreign media*/
offset The offset from the beginning of the file for this
stage request. As the system is reading a "stage
never" file, the file offset moves down the file.
For a normal stage of a file the stage offset is
size The size of the file to stage for this stage
request. During a "stage never" request, this is
the size the file system wants to deliver at this
time. For a normal stage of a file the size is
the size of the file.
position The position field(s) from the archive information
in the inode.
inode The inode number from the file system.
vsn The vsn field from the archive information in the
fseq The equipment number of the family set for the
The two character media type for the foreign
media. Upon succesful initialization a value of 0
is returned. Otherwise, a value of 1 is returned
and errno is set to indicate the error.
usam_mig_cancel_stage_req() fails if the following is true:
The example Migration Toolkit program.
The configuration file for Sun QFS and
SAM-QFS file systems.