LLAPI_OPEN_BY_FID(3)
β¨ NAME β¨
llapi_open_by_fid, llapi_open_by_fid_at β okay so these two cuties open a file descriptor from a File Identifier π no path-walking drama, we're going straight to the fid periodt
π¦ 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 πΈ
So llapi_open_by_fid() opens a file descriptor in the filesystem mountpoint that path points at, and it does it for the file identified by fid, using the open file flags you hand it in oflag β literally exactly like your normal open(2) call does, same energy.
And llapi_open_by_fid_at()? She's the β¨ _at() variant β¨ β she opens a file descriptor on fid in the filesystem referenced by the open file descriptor dir_fd. Think of it like open_by_handle_at(3), that system call that opens files by their NFS file handle (iykyk). Oh and if dir_fd is AT_CWD, then the open happens against the local working directory. iconic. π
π RETURN VALUES π
She returns a file descriptor number when she's slaying π or a negative errno value if it flopped. π
π ERRORS π
-EINVALβ bestie you passed an invalid argument π-ENOMEMβ no memory available during the operation, she's running on empty π«
π AVAILABILITY π
llapi_open_by_fid() and llapi_open_by_fid_at() are part of the lustre(7) user application interface library, and they've been in the group chat since release 2.4.0. long-running friendship fr fr π«Ά
π₯ SEE ALSO π₯
llapi_fd2fid(3), llapi_fid_parse(3), llapi_fid2path(3), llapi_path2fid(3), open_by_handle_at(3), lustreapi(7)
okay that's the whole page, no skips, no edits, everything's still there π and just so we're keeping receipts: this one's from the Lustre User API, dated 2024-08-27. mwah, go open some fids bestie πβ¨πΈ
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms