LLAPI_RMFID(3)
π LLAPI_RMFID π
okay so bestie, this is a page from the Lustre Library Functions manual β it's all about yeeting files off your Lustre filesystem by their FIDs. no cap, it's a whole β¨ thing β¨.
πΈ NAME πΈ
llapi_rmfid, llapi_rmfid_at β remove files by their FIDs in Lustre. literally what it says on the tin π
β¨ SYNOPSIS β¨
#include <lustre/lustreapi.h>
int llapi_rmfid(const char *path, struct fid_array *fa);
int llapi_rmfid_at(int fd, struct fid_array *fa);
π¦ DESCRIPTION π¦
So llapi_rmfid() tries to remove fa->fa_nr Lustre files, and it finds them by the FIDs stashed in fa->fa_fids. Heads up though β all of a file's hardlinks are subject to removal, so likeβ¦ every single one. π
This functionality is available only for root or regular users, and only on filesystems that were mounted with the user_fid2path mount option. And even then, a regular user can only delete files that they own and that live in a directory where they have write permission. permission check said no? then it's a no, bestie. π
llapi_rmfid_at() is basically llapi_rmfid's sibling π― β it also tries to remove Lustre files by the FIDs stored in fa->fa_fids, except the path or device is pointed to by an already verified fd. so the fd already did its vibe check β
, you don't have to redo it.
π RETURN VALUES π
Both llapi_rmfid() and llapi_rmfid_at() return 0 on success, or a negative errno value on failure. π
The result for each individual file gets stored in the corresponding fa->fa_fid[N].f_ver.
okay bestie, tiny heads-up so you don't gaslight yourself: yes, the text really does sayfa->fa_fid[N]right up in there while the description saidfa->fa_fids. that's what the page says, so that's what you get. iykyk π«Ά
π ERRORS π
-ENOENTβ file does not exist. it's giving ghost π»-EBUSYβ file is open and can't be removed. bestie is busy rn, come back later.-EPERMβ the file cannot be open by user, orCAP_DAC_READ_SEARCHis not granted. nope, not you. π-EINVALβ invalid FID is passed. that FID is not it, fr fr. π-ENOMEMβ not enough memory to process the request. the RAM said no. π-ENOTTYβ file may not point to a Lustre filesystem mountpoint. wrong 'verse, wrong filesystem. πͺ
π AVAILABILITY π
llapi_rmfid() and llapi_rmfid_at() are part of the lustre(7) user application interface library since release 2.13.0 β so if you're on something olderβ¦ that's rough, buddy.
π SEE ALSO π
and that's the whole page, bestie!! π this was written up by the Lustre User API girlies β page date 2024-08-28 β and that's on periodt. ππ§β¨
π¦ 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