Whamcloud - gitweb
LU-17699 utils: new --skip option for lfs find
[fs/lustre-release.git] / lustre / doc / llapi_pcc_detach_fid_fd.3
1 .TH llapi_pcc_detach_fid_fd 3 "2019 April 20" "Lustre User API"
2 .SH NAME
3 llapi_pcc_detach_fid_fd, llapi_pcc_detach_fid, llapi_pcc_detach_fid_str,
4 llapi_pcc_detach_file \- detach the given file from PCC
5 .SH SYNOPSIS
6 .nf
7 .B #include <lustre/lustreapi.h>
8 .PP
9 .BI "int llapi_pcc_detach_fid_fd(int " dirfd ", const struct lu_fid *" fid ",
10 .BI "                            __u32 " flags );
11 .PP
12 .BI "int llapi_pcc_detach_fid(const char *" mntpath ",
13 .BI "                         const struct lu_fid *" fid ", __u32 " flags );
14 .PP
15 .BI "int llapi_pcc_detach_fid_str(const char *" mntpath ",
16 .BI "                             const char *" fidstr ", __u32 " flags );
17 .PP
18 .BI "int llapi_pcc_detach_file(const char *" path ", __u32 " flags );
19 .fi
20 .SH DESCRIPTION
21 .PP
22 .BR llapi_pcc_detach_fid_fd() ,
23 .BR llapi_pcc_detach_fid() ,
24 .BR llapi_pcc_detach_fid_str() ,
25 and
26 .BR llapi_pcc_detach_file()
27 detach a cached file from PCC by an ioctl on the dir or the file itself. The
28 file is referenced
29 by
30 .IR fid ,
31 .IR fidstr ,
32 or
33 .IR path .
34 The dir, which usually a mount point dir that the copytool already has opened,
35 is referenced by
36 .IR dirfd ,
37 .IR mntpath ,
38 .IR path .
39 The detach flags is specified by
40 .IR flags
41 argument, which is a
42 .B enum lu_pcc_detach_flags
43 data structure, which contains the following values:
44 .nf
45 .LP
46         PCC_DETACH_FL_NONE                      = 0x0,
47         PCC_DETACH_FL_UNCACHE           = 0x01,
48         PCC_DETACH_FL_KNOWN_READWRITE   = 0x02,
49         PCC_DETACH_FL_KNOWN_READONLY    = 0x04,
50         PCC_DETACH_FL_CACHE_REMOVED     = 0x08,
51 .fi
52 .TP
53 PCC_DETACH_FL_NONE
54 means that detach the file from PCC yet retain the data copy on PCC backend.
55 .TP
56 PCC_DETACH_FL_UNCACHE
57 means that remove the PCC copy after detach.
58 .TP
59 PCC_DETACH_KNOWN_READWRITE
60 means that it is known that the file was once cached as PCC-RW.
61 .TP
62 PCC_DETACH_KNOWN_READONLY
63 means that it is known that the file was once cached as PCC-RO.
64 .TP
65 PCC_DETACH_FL_CACHE_REMOVED
66 indicates that PCC cached copy is removed. It is used to tell the user space
67 caller that the file is detached and the corresponding PCC copy is removed.
68 .SH RETURN VALUES
69 .LP
70 .BR llapi_pcc_detach_fid_fd() ,
71 .BR llapi_pcc_detach_fid() ,
72 .BR llapi_pcc_detach_fid_str() ,
73 and
74 .B llapi_pcc_detach_file()
75 return 0 on success or a negative errno value on failure.
76 .SH ERRORS
77 .TP 15
78 .SM -ENOMEM
79 Insufficient memory to complete operation.
80 .TP
81 .SM -EFAULT
82 Memory region is not properly mapped.
83 .TP
84 .SM -EINVAL
85 One or more invalid arguments are given.
86 .TP
87 .SM -EOPNOTSUPP
88 PCC state operation is not supported.
89 .TP
90 .SM -ENOTTY
91 File does not reside on a Lustre filesystem.
92 .TP
93 .SM -ENOENT
94 .I path
95 does not exist.
96 .SH "SEE ALSO"
97 .BR llapi_pcc_attach (3),
98 .BR lustreapi (7)