LLAPI_DIR_CREATE_FOREIGN(3)
π« LLAPI_DIR_CREATE_FOREIGN π«
okay bestie, sit down, we're doing a Lustre Library Functions moment β this one lives in section 3 of the manual, LLAPI_DIR_CREATE_FOREIGN(3), and it's literally the girl who makes foreign directory entries happen. no cap. π¦
β¨ NAME β¨
llapi_dir_create_foreign β create a foreign directory entry π
πΈ SYNOPSIS πΈ
#include <lustre/lustreapi.h>
int llapi_dir_create_foreign(const char *name, mode_t mode,
__u32 type, __u32 flags,
const char *value)
π DESCRIPTION π
so what does she do. llapi_dir_create_foreign() creates a foreign directory entry β and that entry stores a reference to external storage or metadata. which means Lustre can track and manage directories that live outside the Lustre filesystem. it's giving "we're keeping receipts on something that isn't even here." iconic honestly. π
the arguments, bestie, one by one:
nameβ the pathname of the directory entry to create. the parent directory has to already exist, and it has to be on a Lustre filesystem. no parent, no party. π«modeβ the permission bits for the new directory, exactly like howopen(2)describes them.typeβ the type of foreign directory. this is what identifies what kind of external storage or system the foreign reference is pointing at.flagsβ flags that control the behavior of the foreign directory entry.valueβ a string value holding the foreign reference information, like a path or an identifier in the external system.
π₯ RETURN VALUE π₯
llapi_dir_create_foreign() returns 0 on success π«Ά, or a negative errno value if it fails π.
π ERRORS π
-EACCESβ permission denied on parent directory.-EALREADYβ stripe already set on existing directory.-EEXISTβ directory already exists.-EINVALβ an invalid argument was specified.-ENOENTβ parent directory does not exist.-ENOMEMβ not enough memory to allocate a resource.
ngl if you're seeing one of these, read it carefully before you start blaming yourself. the errno is literally telling you what's up. π«‘
π AVAILABILITY π
llapi_dir_create_foreign() is part of the lustre(7) user application interface library since release 2.13.0. so if your release is older than thatβ¦ she's not there yet, bestie. π
π SEE ALSO π
and that's the whole vibe check, fr fr. this page came from the Lustre User API, dated 2026-01-26 β go forth and make your foreign directories, you absolute main character. πβ¨ππ¦πΈπ
π«Άππ₯ππβππππ§π
π¦ 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