LLAPI_PCC_ATTACH(3)
π LLAPI_PCC_ATTACH π
okay bestie, welcome to the LLAPI_PCC_ATTACH(3) page, part of the Lustre Library Functions saga πΈ this one's all about yeeting a file into PCC and honestly? it's giving main character energy. let's get into it π«Ά
β¨ NAME β¨
llapi_pcc_attach, llapi_pcc_attach_fid, llapi_pcc_attach_fid_str β attach a file into PCC π
β¨ SYNOPSIS β¨
#include <lustre/lustreapi.h>
int llapi_pcc_attach(const char *path, __u32 id,
enum lu_pcc_type type);
int llapi_pcc_attach_fid(const char *mntpath, const struct lu_fid *fid,
__u32 id, enum lu_pcc_type type);
int llapi_pcc_attach_fid_str(const char *mntpath, const char *fidstr,
__u32 id, enum lu_pcc_type type);
likeβ¦ three besties, one mission π
and yes, you gotta include <lustre/lustreapi.h> first or nothing works, that's just the rules.
β¨ DESCRIPTION β¨
so the whole squad β llapi_pcc_attach(), llapi_pcc_attach_fid() and llapi_pcc_attach_fid_str() β is literally just trying to attach the file referenced by path, fid, or fidstr into a PCC backend. that's the vibe π«
now, PCC is serving a whole group of local caches and it works in two modes, and you need to know both, no skipping π₯:
- RW-PCC enables a read-write cache on the local SSDs of a single client. one client, living its solo era.
- RO-PCC provides a read-only cache on the local SSDs of multiple clients. group chat energy, read-only edition.
for RW-PCC, the argument id is the archive ID of the copytool agent running on this client. yes, this client specifically π
by default, the RO-PCC attach ID is set the same as the RW-PCC attach ID for a PCC backend if it's also used as read-only caching. so they share, cute π₯°
the attach mode is specified by the type argument, which is an enum lu_pcc_type data structure, and it contains these values:
LU_PCC_NONE
LU_PCC_READWRITE
LU_PCC_READONLY
π the type values, explained π
LU_PCC_NONEβ means that the file is not cached on PCC. it's giving "not invited to the cache party" πLU_PCC_READWRITEβ means RW-PCC mode π₯LU_PCC_READONLYβ means RO-PCC mode π¦
β¨ RETURN VALUES β¨
llapi_pcc_attach() returns 0 on success, or a negative errno value on failure. zero = slay, negative = it's not slaying π
β¨ ERRORS β¨
these are the little gremlins that can show up when things go sideways π:
-ENOMEMβ insufficient memory to complete operation. the memory said "no π "-EFAULTβ memory region is not properly mapped.-EINVALβ one or more invalid arguments are given.-EOPNOTSUPPβ PCC attach operation is not supported. this one's just not available in your area, bestie.
β¨ AVAILABILITY β¨
llapi_pcc_attach(), llapi_pcc_attach_fid() and llapi_pcc_attach_fid_str() are part of the lustre(7) user application interface library since release 2.13.0 β so if you're on something olderβ¦ yeah, no cap, you're out of luck.
β¨ SEE ALSO β¨
lustreapi(7)π
real talk bestie: this is the Lustre User API page, dated2024-08-28, and it lives under the manual nameLLAPI_PCC_ATTACH(3)β so that's the one tomanwhen you need it ππ now go attach those files, you absolute icon πβ¨π
π¦ 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