LLAPI_LAYO...E_SIZE_GET(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’… NAME πŸ’…

llapi_layout_stripe_size_get, llapi_layout_stripe_size_set β€” bestie, these two are literally your get-and-set twin duo for the stripe size of a Lustre file πŸ¦‹


✨ SYNOPSIS ✨

okay so first you gotta pull in the header, no cap:

#include <lustre/lustreapi.h>

and then here's the whole squad, signatures verbatim, character for character πŸ’–:

int llapi_layout_stripe_size_get(const struct llapi_layout *layout,
                                 uint64_t *stripe_size);

int llapi_layout_stripe_size_set(struct llapi_layout *layout,
                                 uint64_t stripe_size);

🌸 DESCRIPTION 🌸

so like, what even is stripe size? striped files store data in chunks, and the stripe size tells you how much data to write to one OST before moving to the next OST. it's giving "how big is each little bite" energy πŸ“

llapi_layout_stripe_size_get() β€” this one stores into stripe_size the stripe size of layout. you hand it a layout, it hands you back the number. iconic.

llapi_layout_stripe_size_set() β€” this one sets the stripe size of layout to stripe_size. you tell it what you want, it makes it so. main character behavior tbh πŸ‘‘

and here's the little magic value you need to know: a stripe_size value of LLAPI_LAYOUT_DEFAULT means that the default stripe size will be used. periodt. πŸ’…


πŸ”₯ RETURN VALUES πŸ”₯

both llapi_layout_stripe_size_get() and llapi_layout_stripe_size_set() return 0 on success, or -1 if an error occurred β€” and in that case, errno is set appropriately. so like, always check for that -1, bestie, or you'll be out here confused and crying 😭


πŸ’€ ERRORS πŸ’€

  • EINVAL β€” an invalid argument was specified. you passed something cursed, babes. try again with actual valid vibes πŸ™ˆ

🌈 AVAILABILITY 🌈

llapi_layout_stripe_size_get() and llapi_layout_stripe_size_set() is part of the lustre(7) user application interface library since release 2.7.0. so if you're on anything older… no it isn't, sorry bestie 🧚


🌟 SEE ALSO 🌟

go read those too, iykyk πŸ“šβœ¨


okay that's the whole page, you ate that fr fr πŸ’– this was the Lustre User API manual, dated 2024-08-27 β€” catch you in LLAPI_LAYO...E_SIZE_GET(3) whenever you need her again πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from