LLAPI_LAYO...EXTENT_GET(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– llapi_layout_comp_extent_get, llapi_layout_comp_extent_set β€” it's giving "Lustre Library Functions", bestie πŸ’–

okay so real talk: this is a page from the Lustre Library Functions manual (section 3, the llapi_layout_comp_extent_get(3) one, if you're keeping track). And babes, it's a short one β€” but every single crumb of it matters, so let's get into it ✨


🌸 NAME 🌸

llapi_layout_comp_extent_get, llapi_layout_comp_extent_set β€” get or set the extent of a layout component.

like… that's literally the whole job. one reads the extent, one writes the extent. iconic behavior fr fr 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <lustre/lustreapi.h>

int llapi_layout_comp_extent_get(const struct llapi_layout *layout,
                                 uint64_t *start, uint64_t *end);

int llapi_layout_comp_extent_set(const struct llapi_layout *layout,
                                 uint64_t start, uint64_t end);

see how cute that include line is? #include <lustre/lustreapi.h>. do NOT forget it, she's the moment πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so the extent [start, end) defines the range of a layout component. that's the vibe. half-open interval, end is not included, periodt. πŸ”₯

llapi_layout_comp_extent_get(3) gets the extent of the current component of layout and stores it into start and end. passive queen β€” it just reads and hands the numbers over, no drama.

llapi_layout_comp_extent_set(3) sets the extent [start, end) to the current component of layout. this one's the main character: it takes your numbers and makes them real. πŸ‘‘


πŸ’œ RETURN VALUES πŸ’œ

both llapi_layout_comp_extent_get() and llapi_layout_comp_extent_set() return 0 on success, or -1 if an error occurred (in which case, errno is set appropriately).

so yeah β€” 0 good, -1 bad, and if you get that -1 bestie, go check errno. she always has the tea πŸ™ˆ


πŸ’€ ERRORS πŸ’€

  • EINVAL β€” An invalid argument was specified.

that's it. that's the whole list. one singular error code, and it's the classic "you gave me something weird" energy. not me ignoring the haters (the haters are invalid arguments) βœ‹


✨ AVAILABILITY ✨

llapi_layout_comp_extent_get() and llapi_layout_comp_extent_set() are part of the lustre(7) user application interface library since release 2.10.0.

so if you're on something ancient? no they're not there. upgrade, bestie, it's 2.10.0 and up. 🧚


🌈 SEE ALSO 🌈

go read those too, iykyk πŸ“


that's the whole page, no notes. slay πŸ’–

this was brought to you by the Lustre User API, dated 2024-08-27, originally living in section 3 as LLAPI_LAYO...EXTENT_GET(3). take care of her, she's short but she's perfect ⭐
πŸ“¦ where this page comes from