LLAPI_HEAT_GET(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– LLAPI_HEAT_GET(3) β€” Lustre Library Functions, section 3 πŸ’–

okay bestie, welcome to the glow-up corner of the Lustre Library Functions manual, section 3 β€” where we talk about how hot πŸ”₯ your files are. literally. not metaphorically. there's a whole heat system and she's iconic.


✨ NAME ✨

llapi_heat_get, llapi_heat_set β€” get and clear heat for a file 🌑️

like. she gets the heat, and she clears the heat. two functions, one vibe.


πŸŽ€ SYNOPSIS πŸŽ€

#include <lustre/lustreapi.h>

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

int llapi_heat_set(int fd, __u64 flags);

no cap, that's the whole entrance. #include the header, and you're in 🫢


🌸 DESCRIPTION 🌸

so. llapi_heat_get() β€” she returns file access frequency information on the file descriptor fd. the tea gets handed back to you in the heat argument, which you should have already allocated (not her job, bestie, she's not your malloc πŸ’…). it's a lu_heat data structure, and it has these fields:

struct lu_heat {
     __u32 lh_heat_count;
     __u32 lh_padding1;
     __u64 lh_heat[];
};

then there's llapi_heat_set(), and her main character energy is clearing the heat information on the file descriptor fd β€” she does it according to the flags parameter, which gives you the options for file heat. currently it's one of these:

  • LU_HEAT_FLAG_CLEAR β€” clears the heat information for a given file. poof. gone. 🧹✨
  • LU_HEAT_FLAG_OFF β€” turns off the file heat support for a given file. she's off the clock, don't ask her for numbers anymore πŸ™ˆ

πŸ’€ RETURN VALUES πŸ’€

llapi_heat_get() and llapi_heat_set() return 0 on success or a negative errno value on failure. that's it. zero = slay, negative = not slay 😭


🌈 ERRORS 🌈

  • -ENOMEM β€” insufficient memory to complete operation. she's hungry and the RAM said no.
  • -EFAULT β€” memory region is not properly mapped. the memory is giving "where am I" 🫠
  • -EINVAL β€” one or more invalid arguments are given. you handed her nonsense, respectfully.
  • EOPNOTSUPP β€” file heat operation is not supported. this filesystem did not get the memo, it's giving unsupported fr fr.

πŸ‘‘ AVAILABILITY πŸ‘‘

llapi_heat_get() and llapi_heat_set() are part of the lustre(7) user application interface library since release 2.13.0. so if your release is older than that? bestie. no. upgrade. ⭐


πŸ¦‹ SEE ALSO πŸ¦‹


ngl, if you're calling these on a file whose heat isn't supported, expect EOPNOTSUPP and go touch grass. πŸ’œ

that's the whole page, and honestly? she ate. πŸŽ€

signing off from the Lustre User API, dated 2024-08-27 β€” same LLAPI_HEAT_GET(3) energy, forever and always πŸ’–βœ¨πŸ’…

πŸ“¦ where this page comes from