llapi_open_by_fid(3)

NAME
llapi_open_by_fid - open a file descriptor from a File Identifier

SYNOPSIS
#include <lustre/lustreapi.h>

int llapi_open_by_fid(const char *mntpath, struct lu_fid *fid, int oflag);
int llapi_open_by_fid_at(int dir_fd, struct lu_fid *fid, int oflag);

DESCRIPTION

llapi_open_by_fid() opens a file descriptor in the filesystem mountpoint referenced by path for the file identified by fid, using the open file flags in oflag (as with the normal open(2) call).

llapi_open_by_fid_at() opens a file descriptor on fid in the filesystem referenced by the open file descriptor dir_fd. This is similar to the open_by_handle_at(3) system call that can open files by their NFS file handle. If dir_fd is AT_CWD then the open is performed against the local working directory.

RETURN VALUES

returns file descriptor number or a negative errno value on failure.

ERRORS

-EINVAL
    An invalid argument was specified.

-ENOMEM
    No memory was available during operation.

SEE ALSO
llapi_fid_parse(3), llapi_fid2path(3), llapi_path2fid(3), lustreapi(7), open_by_handle_at(3)