Ubuntu Manpages

gfs_pio_open

open a file in the Gfarm file system

#include <gfarm/gfarm.h>

gfarm_error_t gfs_pio_open (const char * gfarm_url, int flags, GFS_File * gfp);

gfs_pio_open() opens a file in the Gfarm file system specified by gfarm_url, and returns a GFS_File structure to the address pointed by gfp. gfarm_url is a path name in the Gfarm file system, or a Gfarm URL in the form of gfarm://metaserver:port/path/name.

Values of flags are constructed by a bitwise-inclusive-OR of the following list. Exactly one of the first three values should be specified:

Open for reading only.
Open for writing only.
Open for reading and writing.
If the file already exist and is a regular file, it will be truncated to length 0 if the open mode allows writing.

The function terminated successfully.
gfarm_url refers to a directory.
gfarm_url refers to a symbolic link.
gfarm_url refers to not a regular file.
A component used as a directory in gfarm_url does not exist.
A component used as a directory in gfarm_url is not, in fact, a directory.
The requested access to the file is not allowed, or one of the directories in gfarm_url did not allow search (execute) permission. Or, the authentication to the metadata server fails.
Insufficient memory was available.
flags is not valid.
gfarm_url does not include a metadata server.
gfarm_url does not include a port number of the metadata server.
The metadata server cannot be resolved.
The process opens too many files.
The system limit on the total number of open files has been reached.
Network is unrechable.
Connetion timeout occurs.
Protocol error occurs.
Connection to the metadata server is broken.
Specified authentication protocol is not supported.
User authentication failed when connecting to the metadata server.
An error except the above occurred. The reason is shown by gfarm_error_string(3).

gfs_pio_close(3), gfs_pio_create(3), gfs_pio_eof(3), gfs_pio_error(3), gfs_pio_flush(3), gfs_pio_getc(3), gfs_pio_getline(3), gfs_pio_open(3), gfs_pio_putc(3), gfs_pio_putline(3), gfs_pio_puts(3), gfs_pio_read(3), gfs_pio_seek(3), gfs_pio_ungetc(3), gfs_pio_write(3)