LLAPI_PCC_ATTACH(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– 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 ✨


real talk bestie: this is the Lustre User API page, dated 2024-08-28, and it lives under the manual name LLAPI_PCC_ATTACH(3) β€” so that's the one to man when you need it πŸ“–πŸ’– now go attach those files, you absolute icon πŸŽ€βœ¨πŸ’…
πŸ“¦ where this page comes from