LLAPI_LAYOUT_ALLOC(3)
π LLAPI_LAYOUT_ALLOC(3) β the Lustre Library Functions girlies know π
okay bestie, so this is a page from the Lustre Library Functions manual (section 3, we're fancy like that), and it's all about the two little functions that make a struct llapi_layout exist and then, y'know, un-exist. birth and death. the circle of life. periodt. π¦
β¨ NAME β¨
llapi_layout_alloc, llapi_layout_free β allocate and destroy struct llapi_layout objects.
like. they make one, and they take one away. iconic duality fr fr.
β¨ SYNOPSIS β¨
#include <lustre/lustreapi.h>
struct llapi_layout *llapi_layout_alloc(void);
void llapi_layout_free(struct llapi_layout *layout);
β¨ DESCRIPTION β¨
So llapi_layout_alloc() hands you back a pointer to a freshly-allocated struct llapi_layout. π
And what is a struct llapi_layout? bestie it's an opaque entity β like, it's holding all the layout info for a file in a Lustre filesystem, but you're not supposed to peek inside. the internal structure should not be directly accessed by an application, no cap. that's not your business, that's the struct's business.
What you can do with it: pass it into the subsequent calls to the functions referenced in the llapi_layout(7) manual page, so you can modify layout attributes and create files with the layout you want. π
The struct you get back is initialized with default attribute values that will affect the standard Lustre behavior for assigning layouts to newly-created files. want to change those defaults? go off β use the group of functions in the struct llapi_layout API whose names end with _set. β¨
And when you're done with the pointer? free it with llapi_layout_free(). no memory leaks in this house. π«π§
Meanwhile llapi_layout_free() frees the memory associated with layout.
β¨ RETURN VALUES β¨
llapi_layout_alloc()β returns a valid pointer on success, orNULLon failure, witherrnoset to the appropriate error code. π (it be like that sometimes)llapi_layout_free()β returns no value. it's avoid, she doesn't speak. π
β¨ ERRORS β¨
ENOMEMβ Insufficient storage space is available.
(that's the whole list bestie. one error. she's low maintenance.)
β¨ AVAILABILITY β¨
llapi_layout_alloc() and llapi_layout_free() are part of the lustre(7) user application interface library since release 2.7.0. vintage but make it slay. π
β¨ SEE ALSO β¨
πΈ reminder babes: the struct is opaque, do NOT reach inside it, don't forget tollapi_layout_free()your pointer, and always, always check forNULL. π«Ά
and that's the tea! this gorgeous page came to you courtesy of the Lustre User API, dated 2024-08-27, filed under LLAPI_LAYOUT_ALLOC(3). mwah, go write some layouts bestie πβ¨π
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms