Content-type: text/html
Manpage of plfs_open
plfs_open
Section: C Library Functions (3)
Updated: 12/3/2010
Index
Return to Main Contents
NAME
plfs_open
SYNTAX
#include <plfs.h>
int plfs_open( Plfs_fd **, const char *path,
int flags, pid_t pid, mode_t mode, Plfs_open_opt *open_opt);
DESCRIPTION
Open a file. See
open(2)
for more informtion.
INPUT PARAMETERS
- Plfs_fd
-
The address to a file handle pointer. On the first call to this function,
this should be set to NULL. On success, the address points
to an instantiated file handle. Note that the user should not themselves
free this handle; rather it is freed by calling plfs_close(). Multiple
threads can open on the same path and share a file handle; however this
call is not thread-safe, the call must ensure serialization. Subsequent
calls to plfs_read, plfs_write, etc. are thread-safe however.
- path
-
path to open file
- flags
-
flag for access mode, one of O_RDONLY, O_WRONLY, or O_RDWR
- pid
-
A unique value to ensure that multiple writers will not
interfere with each other. If multiple processes from different nodes
are sharing a file, the unique values must be unique only for each node
(i.e. different nodes can use the same value safely).
- mode_t
-
permission to open the file with
- Plfs_open_opt
-
Advanced options for low-level developers. Typically will be NULL.
RETURN VALUES
Most PLFS functions return 0 or -errno, except write and read
which return the number of bytes or -errno. This function
AUTHORS
PLFS is developed at Los Alamos National Laboratory and is available under LANL LA-CC-08-104. It is hosted at
http://sourceforge.net/projects/plfs
and more information is available at
http://institute.lanl.gov/plfs
SEE ALSO
plfs(3), plfs(7), is_plfs_file(3), plfs_access(3), plfs_buildtime(3), plfs_chmod(3), plfs_chown(3), plfs_close(3), plfs_create(3), plfs_debug(3), plfs_dump_config(3), plfs_dump_index(3), plfs_flatten_index(3), plfs_get_attr(3), plfs_index_stream(3), plfs_link(3), plfs_merge_indexes(3), plfs_mkdir(3), plfs_mode(3), plfs_open(3), plfs_query(3), plfs_read(3), plfs_readdir(3), plfs_readlink(3), plfs_rename(3), plfs_rmdir(3), plfs_serious_error(3), plfs_set_mpi(3), plfs_stats(3), plfs_statvfs(3), plfs_symlink(3), plfs_sync(3), plfs_trunc(3), plfs_unlink(3), plfs_utime(3), plfs_version(3), plfs_write(3), plfs_wtime(3)
Index
- NAME
-
- SYNTAX
-
- DESCRIPTION
-
- INPUT PARAMETERS
-
- RETURN VALUES
-
- AUTHORS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 14:33:59 GMT, June 15, 2012