Whamcloud - gitweb
LU-11997 ptlrpc: Properly swab ll_fiemap_info_key
[fs/lustre-release.git] / lustre / doc / llapi_rmfid.3
1 .TH llapi_rmfid 3 "2014 Oct 13" "Lustre User API"
2 .SH NAME
3 llapi_rmfid \- Remove files by their FIDs in Lustre.
4 .SH SYNOPSIS
5 .nf
6 .B #include <lustre/lustreapi.h>
7 .PP
8 .BI "int llapi_rmfid(const char *" path ", struct fid_array *" fa ");
9
10 .sp
11 .fi
12 .SH DESCRIPTION
13 .PP
14 .BR llapi_rmfid()
15 tries to remove
16 .I fa->fa_nr
17 Lustre files by FIDs stored in
18 .I fa->fa_fids
19 All file's hardlinks are subject to removal. This functionality is available
20 only for root or regular users on filesystems mounted with
21 .I user_fid2path
22 mount option to delete files that they own and are in a directory in which
23 they have write permission.
24
25 .SH RETURN VALUES
26 .LP
27 .B llapi_rmfid()
28 return 0 on success or a negative errno value on failure. Result for each file
29 is stored in the corresponding
30 .I fa->fa_fid[N].f_ver
31 .SH ERRORS
32 .TP 15
33 .TP
34 .SM -ENOENT
35 .I file
36 does not exist.
37 .TP
38 .SM -EBUSY
39 file is open and can't be removed
40 .TP
41 .SM -EPERM
42 The file cannot be open by user or CAP_DAC_READ_SEARCH is not granted.
43 .TP
44 .SM -EINVAL
45 Invalid FID is passed
46 .TP
47 .SM -ENOMEM
48 Not enough memory to process the request
49 .SH "SEE ALSO"
50 .BR lustreapi (7)