| LLAPI_OPEN_BY_FID(3) | Lustre Library Functions | LLAPI_OPEN_BY_FID(3) |
NAME
llapi_open_by_fid, llapi_open_by_fid_at - 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
AVAILABILITY
llapi_open_by_fid() and llapi_open_by_fid_at() is part of the lustre(7) user application interface library since release 2.4.0
SEE ALSO
llapi_fd2fid(3), llapi_fid_parse(3), llapi_fid2path(3), llapi_path2fid(3), open_by_handle_at(3), lustreapi(7)
| 2024-08-27 | Lustre User API |