LLAPI\_HEAT\_GET(3) Lustre Library Functions LLAPI\_HEAT\_GET(3)

# [NAME](#NAME)

llapi\_heat\_get, llapi\_heat\_set - get and clear heat for a file

# [SYNOPSIS](#SYNOPSIS)

```
#include <lustre/lustreapi.h>
```

```
int llapi_heat_get(int fd, struct lu_heat *heat);
```

```
int llapi_heat_set(int fd, __u64 flags);
```

# [DESCRIPTION](#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](#LU_HEAT_FLAG_CLEAR)

Clear the heat information for a given file.

[LU\_HEAT\_FLAG\_OFF](#LU_HEAT_FLAG_OFF)

Turn off the file heat support for a given file.

# [RETURN VALUES](#RETURN_VALUES)

**llapi\_heat\_get()** and **llapi\_heat\_set()** return 0 on success or a negative errno value on failure.

# [ERRORS](#ERRORS)

[**-ENOMEM**](#ENOMEM)

Insufficient memory to complete operation.

[**-EFAULT**](#EFAULT)

Memory region is not properly mapped.

[**-EINVAL**](#EINVAL)

One or more invalid arguments are given.

[**EOPNOTSUPP**](#EOPNOTSUPP)

File heat operation is not supported.

# [AVAILABILITY](#AVAILABILITY)

**llapi\_heat\_get()** and **llapi\_heat\_set()** are part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) user application interface library since release 2.13.0

# [SEE ALSO](#SEE_ALSO)

[**lustreapi**(7)](/man/enterprise-packages/lustre/lustreapi.7)

2024-08-27 Lustre User API

---

Document: llapi_heat_set(3) from lustre 2.17.59-r1 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
