LLAPI_LAYOUT_EXTENSION_SIZE_SET(3)
π LLAPI_LAYOUT_EXTENSION_SIZE_GET β get or set the extension size of an extension component of a Lustre file π
okay bestie, this one lives in the Lustre Library Functions corner of the manual (section 3, the library-calls girlies π«Ά), and it's all about the extension size of an extension component. Buckle up, it's lowkey fascinating.
β¨ NAME β¨
llapi_layout_extension_size_get, llapi_layout_extension_size_set β get or set the extension size of an extension component of a Lustre file
πΈ SYNOPSIS πΈ
#include <lustre/lustreapi.h>
int llapi_layout_extension_size_get(const struct llapi_layout *layout,
uint64_t *ext_size);
int llapi_layout_extension_size_set(struct llapi_layout *layout,
uint64_t ext_size);
π¦ DESCRIPTION π¦
So. The extension size is the unit of increase of the previous component size when you're writing within the region of the current extension component. That's the whole glow-up right there. β¨
At the time of the change, the OSTs of the previous component layout get a vibe check β literally, they're checked to see if they have at least ext_size free space. And if there is not enough free space? The space covered by the extension component spills over to the next component, no cap. (there are examples of this in lfs-setstripe(1) if you wanna see it in the wild π).
Now, plot twist for the chaos gremlins: if you do a random write to a middle of the extension component, the extension happens from the beginning of the extension component up to the current writing position plus the ext_size. Okay but β and this is the important part β the check for low space is still done for the ext_size. The rules do not change just because you showed up mid-region, bestie. π
llapi_layout_extension_size_get() stores into ext_size the extension size of layout.
llapi_layout_extension_size_get() sets the extension size of layout to ext_size.
π not me pointing out that's literally what the page says β both lines name the _get function, so read it exactly as written and don't come for me, I'm just the messenger fr fr.
π RETURN VALUES π
llapi_layout_extension_size_get() and llapi_layout_extension_size_set() both return 0 on success, or -1 if an error occurred (and in that case, errno gets set appropriately, iconically).
π ERRORS π
EINVALβ An invalid argument was specified. (you gave it something it cannot work with, and it's not being subtle about it π)
π AVAILABILITY π
llapi_layout_extension_size_get() and llapi_layout_extension_size_set() have been part of the lustre(7) user application interface library since release 2.13.0. so yes, they've been serving for a minute. π
β SEE ALSO β
lfs-setstripe(1)llapi_layout_alloc(3)llapi_layout_file_open(3)llapi_layout_stripe_size_get(3)llapi_layout_stripe_size_set(3)llapi_layout(7)lustreapi(7)
and that's the whole page, bestie β brought to you by the Lustre User API, dated 2024-08-27. go forth and set your extension sizes responsibly. mwah. πππ¦πΈπ«Ά
π¦ 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