LLAPI_LAYOUT_COMP_ADD(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– LLAPI_LAYOUT_COMP_ADD(3) πŸ’–

okay bestie, welcome to the Lustre Library Functions corner of the manual, this one's about llapi_layout_comp_add and llapi_layout_comp_del β€” yes they share a page, they're a package deal, like us 🫢


✨ NAME ✨

llapi_layout_comp_add, llapi_layout_comp_del β€” add or delete a layout component into/from the layout.


🌸 SYNOPSIS 🌸

#include <lustre/lustreapi.h>

int llapi_layout_comp_add(struct llapi_layout *layout,
                          struct llapi_layout *comp);

int llapi_layout_comp_del(struct llapi_layout *layout,
                          struct llapi_layout *comp);

πŸ¦‹ DESCRIPTION πŸ¦‹

so a composite layout? it's literally made of several layout components. that's the whole vibe. multiple pieces, one layout. iconic.

llapi_layout_comp_add(3) adds the layout component comp into the existing in-memory layout under construction, and comp is freed. yes, freed β€” she's absorbed, she's part of the family now, don't go touching her afterwards 😭

The layout will be turned into composite if it was plain before adding. a glow-up, fr fr.

All layout attributes of comp will be inherited from the layout, unless otherwise specified for this component by llapi_layout_*_set(3) functions. so the defaults are inherited, but you can override per-component with the setter functions, iykyk.

llapi_layout_comp_del(3) deletes the layout component comp from the in-memory layout, but does not delete the component from an existing file layout on the MDT. ⚠️ read that again bestie β€” in-memory only. the MDT is unaffected. do not come crying to me when your file still has the component on disk.


πŸŽ€ RETURN VALUES πŸŽ€

Both llapi_layout_comp_add() and llapi_layout_comp_del() return 0 on success, or -1 if an error occurred (in which case, errno is set appropriately). classic, love that for them πŸ’…


πŸ’€ ERRORS πŸ’€

  • EINVAL β€” An invalid argument was specified. something you passed was not it, bestie πŸ™ˆ

🌈 AVAILABILITY 🌈

llapi_layout_comp_add() and llapi_layout_comp_del() are part of the lustre(7) user application interface library since release 2.10.0. so they've been serving looks for a while now πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘


lowkey feel free to go read those too, they're all besties in the same friend group 🫢

and that's the whole page, no cap πŸ’– this fine piece of documentation came to you from the Lustre User API, dated 2024-08-27, and it lives at LLAPI_LAYOUT_COMP_ADD(3) β€” periodt ✨

πŸ“¦ where this page comes from