OS Manuals

llapi_rmfid(3)

llapi_rmfid, llapi_rmfid_at - Remove files by their FIDs in Lustre.

LLAPI_RMFID(3) Lustre Library Functions LLAPI_RMFID(3)

llapi_rmfid, llapi_rmfid_at - Remove files by their FIDs in Lustre.

#include <lustre/lustreapi.h>
int llapi_rmfid(const char *path, struct fid_array *fa);
int llapi_rmfid_at(int fd, struct fid_array *fa);

llapi_rmfid() tries to remove fa->fa_nr Lustre files by FIDs stored in fa->fa_fids All file's hardlinks are subject to removal. This functionality is available only for root or regular users on filesystems mounted with user_fid2path mount option to delete files that they own and are in a directory in which they have write permission.

llapi_rmfid_at() Is similar to llapi_rmfid. It tries to remove Lustre files by FIDs stored in fa->fa_fids where path or device is pointed by an already verified fd.

llapi_rmfid() and llapi_rmfid_at() return 0 on success or a negative errno value on failure. Result for each file is stored in the corresponding fa->fa_fid[N].f_ver

file does not exist.
file is open and can't be removed
The file cannot be open by user or CAP_DAC_READ_SEARCH is not granted.
Invalid FID is passed
Not enough memory to process the request
file may not point to a Lustre filesystem mountpoint

llapi_rmfid() and llapi_rmfid_at() is part of the lustre(7) user application interface library since release 2.13.0

llapi_rmfid_at(3), lustreapi(7)

2024-08-28 Lustre User API

lustre 2.17.59-r1 · enterprise-packages · ingested 2026-10-02