.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "GFS_PIO_SET_VIEW_LOCAL" "3" "18 March 2003" "Gfarm" ""
.SH NAME
gfs_pio_set_view_local \- change file view to the corresponding fragment
.SH SYNOPSIS
.sp
\fB#include
.sp
char *gfs_pio_set_view_local (GFS_File \fIgf\fB, int \fIflags\fB);
\fR
.SH "DESCRIPTION"
.PP
\fBgfs_pio_set_view_local()\fR changes the process's view of the data
in the file specified by \fIgf\fR to a file fragment in the local file
view. The local file view model assumes each process has its own file
fragment which is specified by the argument \fInode\fR of
\fBgfs_pio_set_local(3)\fR.
.PP
The total number of file fragments is also specified by the argument
\fInnode\fR of \fBgfs_pio_set_local(3)\fR. If it is different from
the total fragment number of the existent file, it is erroneous.
.PP
Before changing to the local file view, it is necessary to call
\fBgfs_pio_set_local(3)\fR in advance.
.PP
Values of \fIflag\fR are constructed by a bitwise-inclusive-OR of
GFARM_FILE_SEQUENTIAL,
GFARM_FILE_REPLICATE,
and
GFARM_FILE_NOT_REPLICATE.
For details, refer to \fBgfs_pio_set_view_index(3)\fR.
.PP
By default, Gfarm files are accessed as a whole file in global file
view where each fragment can be seamlessly accessed.
.SH "RETURN VALUES"
.TP
\fBNULL\fR
The function terminated successfully.
.TP
\fBGFARM_ERR_NO_MEMORY\fR
Insufficient memory was available.
.TP
\fBGFARM_ERR_OPERATION_NOT_PERMITTED\fR
The file is not a fragmented file.
.TP
\fBGFARM_ERR_FRAGMENT_NUMBER_DOES_NOT_MATCH\fR
The total number of file fragments is different from the existence
one.
.TP
\fBOthers\fR
An error except the above occurred. The reason is shown by its
pointed strings.
.SH "SEE ALSO"
.PP
\fBgfs_pio_create\fR(3),
\fBgfs_pio_open\fR(3),
\fBgfs_pio_set_local\fR(3),
\fBgfs_pio_set_view_index\fR(3)