Whamcloud - gitweb
LU-12616 obclass: fix MDS start/stop race
[fs/lustre-release.git] / lustre / doc / llapi_heat_get.3
1 .TH llapi_heat_get 3 "2019 Feb 09" "Lustre User API"
2 .SH NAME
3 llapi_heat_get, llapi_heat_set \- get and clear heat for a file
4 .SH SYNOPSIS
5 .nf
6 .B #include <lustre/lustreapi.h>
7 .PP
8 .BI "int llapi_heat_get(int " fd ", struct lu_heat *" heat ");"
9
10 .BI "int llapi_heat_set(int " fd ", __u64 " flags ");"
11 .fi
12 .SH DESCRIPTION
13 .PP
14 The function
15 .B llapi_heat_get()
16 returns file access frequency information on the file descriptor
17 .BR fd .
18 Information is returned in the
19 .I heat
20 argument which should already be allocated,  which is a
21 .B lu_heat
22 data structure, which contains the following fields:
23 .nf
24 .LP
25 struct lu_heat {
26         __u32 lh_heat_count;
27         __u32 lh_padding1;
28         __u64 lh_heat[0];
29 };
30 .fi
31 The function
32 .B llapi_heat_set()
33 mainly clears the heat information on the file descriptor
34 .I fd
35 according to the parameter
36 .I flags
37 which gives options for file heat, currently one of:
38 .TP
39 LU_HEAT_FLAG_CLEAR
40 Clear the heat information for a given file.
41 .TP
42 LU_HEAT_FLAG_OFF
43 Turn off the file heat support for a given file.
44
45 .SH RETURN VALUES
46 .LP
47 .B llapi_heat_get()
48 and
49 .B llapi_heat_set()
50 return 0 on success or a negative errno value on failure.
51 .SH ERRORS
52 .TP 15
53 .SM -ENOMEM
54 Insufficient memory to complete operation.
55 .TP
56 .SM -EFAULT
57 Memory region is not properly mapped.
58 .TP
59 .SM -EINVAL
60 One or more invalid arguments are given.
61 .TP
62 .SM EOPNOTSUPP
63 File heat operation is not supported.
64 .SH "SEE ALSO"
65 .BR lustreapi (7)