LLAPI_PCC_STATE_GET(3)
π LLAPI_PCC_STATE_GET π
okay so bestie, welcome to LLAPI_PCC_STATE_GET(3), straight out of the Lustre Library Functions section of the manual. this is the page where we find out what the PCC state of a file is, and honestly? it's giving "short but powerful." no cap. β¨
πΈ NAME πΈ
llapi_pcc_state_get, llapi_pcc_state_get_fd, β get the current PCC state related to a file π¦
β¨ SYNOPSIS β¨
#include <lustre/lustreapi.h>
int llapi_pcc_state_get(const char *path, struct lu_pcc_state *state);
int llapi_pcc_state_get_fd(int fd, struct lu_pcc_state *state);
like. two functions. one job. iconic π
π DESCRIPTION π
so here's the tea, bestie: llapi_pcc_state_get() and llapi_pcc_state_get_fd() hand you back the PCC state information for whichever file you point at β either by path or by fd. π
the info lands in the state argument, which you have to have already allocated before you call (the library is not your mom, it will not allocate it for you, no cap). state is a lu_pcc_state data structure, and it's packing these fields:
struct lu_pcc_state {
__u32 pccs_type; /* enum lu_pcc_type */
__u32 pccs_open_count;
__u32 pccs_flags; /* enum lu_pcc_state_flags */
__u32 pccs_padding;
char pccs_path[PATH_MAX];
};
and now the field-by-field rundown, because we don't gatekeep π«Ά
pccs_typeβ tells you the PCC mode for the given file. it's actually alu_pcc_typedata structure. yes really, that's what it says. πpccs_open_countβ the opener count for the given file, on the client. who's got this file open? the vibes will tell you. π₯pccs_flagsβ the PCC flags for the given file. and um. not used currently. it's there, it's cute, it does nothing. πpccs_pathβ the full path of the cached file on the PCC backend. the actual address of the whole situation. π
π RETURN VALUES π
llapi_pcc_state_get() and llapi_pcc_state_get_fd() return 0 on success (slay) or a negative errno value on failure (not slay). that's it. that's the contract. periodt. β¨
π ERRORS π
-ENOMEMβ Insufficient memory to complete operation. π the memory said no.-EFAULTβ Memory region is not properly mapped. the memory region is lowkey lying to you.-EINVALβ One or more invalid arguments are given. bestie. what did you pass in. π€-EOPNOTSUPPβ PCC state operation is not supported. this operation is simply not the vibe here.
π¦ AVAILABILITY π¦
llapi_pcc_state_get() and llapi_pcc_state_get_fd() are part of the lustre(7) user application interface library since release 2.13.0. so if you're on something older... sorry babe, it's not happening. π§
π SEE ALSO π
and that's the whole page, bestie!! π this was Lustre User API, dated 2024-08-28, and it lives under the name LLAPI_PCC_STATE_GET(3). go forth and check your PCC state, 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