| LLAPI_HEAT_GET(3) | Lustre Library Functions | LLAPI_HEAT_GET(3) |
NAME
llapi_heat_get, llapi_heat_set - get and clear heat for a file
SYNOPSIS
#include <lustre/lustreapi.h>
int llapi_heat_get(int fd, struct lu_heat *heat);
int llapi_heat_set(int fd, __u64 flags);
DESCRIPTION
The function llapi_heat_get() returns file access frequency information on the file descriptor fd. Information is returned in the heat argument which should already be allocated, which is a lu_heat data structure, which contains the following fields:
struct lu_heat {
__u32 lh_heat_count;
__u32 lh_padding1;
__u64 lh_heat[];
};
The function llapi_heat_set() mainly clears the heat information on the
file descriptor fd according to the parameter flags which gives
options for file heat, currently one of:
- LU_HEAT_FLAG_CLEAR
- Clear the heat information for a given file.
- LU_HEAT_FLAG_OFF
- Turn off the file heat support for a given file.
RETURN VALUES
llapi_heat_get() and llapi_heat_set() return 0 on success or a negative errno value on failure.
ERRORS
- -ENOMEM
- Insufficient memory to complete operation.
- -EFAULT
- Memory region is not properly mapped.
- -EINVAL
- One or more invalid arguments are given.
- EOPNOTSUPP
- File heat operation is not supported.
AVAILABILITY
llapi_heat_get() and llapi_heat_set() are part of the lustre(7) user application interface library since release 2.13.0
SEE ALSO
| 2024-08-27 | Lustre User API |