OS Manuals

llapi_heat_get(3)

llapi_heat_get, llapi_heat_set - get and clear heat for a file

LLAPI_HEAT_GET(3) Lustre Library Functions LLAPI_HEAT_GET(3)

llapi_heat_get, llapi_heat_set - get and clear heat for a file

#include <lustre/lustreapi.h>
int llapi_heat_get(int fd, struct lu_heat *heat);
int llapi_heat_set(int fd, __u64 flags);

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:
Clear the heat information for a given file.
Turn off the file heat support for a given file.

llapi_heat_get() and llapi_heat_set() return 0 on success or a negative errno value on failure.

Insufficient memory to complete operation.
Memory region is not properly mapped.
One or more invalid arguments are given.
File heat operation is not supported.

llapi_heat_get() and llapi_heat_set() are part of the lustre(7) user application interface library since release 2.13.0

lustreapi(7)

2024-08-27 Lustre User API

lustre 2.17.59-r2 · enterprise-packages · ingested 2026-10-11