Whamcloud - gitweb
LU-10092 llite: Add persistent cache on client
[fs/lustre-release.git] / lustre / doc / llapi_pcc_attach.3
1 .TH llapi_pcc_attach 3 "2019 April 20" "Lustre User API"
2 .SH NAME
3 llapi_pcc_attach \- attach a file into PCC
4 .SH SYNOPSIS
5 .nf
6 .B #include <lustre/lustreapi.h>
7 .PP
8 .BI "int llapi_pcc_attach(const char *" path ", __u32 " id ,
9 .BI "                     enum lu_pcc_type " type ");"
10 .fi
11 .SH DESCRIPTION
12 .PP
13 The function
14 .B llapi_pcc_attach()
15 tries to attach the file referenced by
16 .BR path
17 into PCC backend. PCC provides a group of local caches and works in two modes:
18 RW-PCC enables a read-write cache on the local SSDs of a single client; RO-PCC
19 provides a read-only cache on the local SSDs of multiple clients. For RW-PCC,
20 the argument
21 .I id
22 is the archive ID of the copytool agent running on this client. By default,
23 RO-PCC attach ID is setting same with RW-PCC attach ID for a PCC backend if it
24 is also used as read-only caching. The attach mode is specified by
25 .I type
26 argument, which is a
27 .B enum lu_pcc_type
28 data structure, which contains the following values:
29 .nf
30 .LP
31         LU_PCC_NONE
32         LU_PCC_READWRITE
33         LU_PCC_READONLY
34 .fi
35 .TP
36 LU_PCC_NONE
37 menas that the file is not cached on PCC.
38 .TP
39 LU_PCC_READWRITE
40 means RW-PCC mode.
41 .TP
42 LU_PCC_READONLY
43 means RO-PCC mode.
44 .SH RETURN VALUES
45 .PP
46 .B llapi_pcc_attach()
47 return 0 on success or a negative errno value on failure.
48 .SH ERRORS
49 .TP 15
50 .SM -ENOMEM
51 Insufficient memory to complete operation.
52 .TP
53 .SM -EFAULT
54 Memory region is not properly mapped.
55 .TP
56 .SM -EINVAL
57 One or more invalid arguments are given.
58 .TP
59 .SM -EOPNOTSUPP
60 PCC attach operation is not supported.
61 .SH "SEE ALSO"
62 .BR lustreapi (7)