LLAPI_POOL_NAME_VALIDATE(3)
π LLAPI_POOL_NAME_VALIDATE(3) β Lustre Library Functions π
okay bestie, so this is a page from section 3 of the Lustre Library Functions manual, and it's literally all about checking that a pool name is not a mess π
β¨ NAME β¨
llapi_pool_name_validate() β the lil vibe check that makes sure your pool name only has valid characters in it π
β¨ SYNOPSIS β¨
#include <lustre/lustreapi.h>
int llapi_pool_name_validate(const char **pool_name);
πΈ DESCRIPTION πΈ
so <pink>llapi_pool_name_validate() is the function you call when you need to verify that every character in *pool_name* is alphanumeric, or a '-', or an '_'β that's it, that's the whole guest list, no plus-ones π« and it also has to be **not longer than**LOV_MAXPOOLNAME` (15) bytes in length, not counting the NUL terminator. like, fifteen bytes bestie, that's the limit, periodt β
here's the tea though π: if pool_name is in the form fsname.pool_name, then the leading fsname. part gets removed, and when the function returns, the pool_name pointer will only point at the pool name itself. why? because that makes pool_name suitable for use in filesystem pool identifiers, duh πββοΈ
and if losing that leading fsname. component is not the move for you, if it's giving "please don't touch my string," then you should use llapi_name_validate(3) to verify the pool name instead. iykyk π¦
β RETURN VALUE β
llapi_pool_name_validate() returns 0 on success π β or a negative errno value on failure π
π₯ ERRORS π₯
EINVALβ the name you handed over had an illegal character in it. rude. πENAMETOOLONGβ the name went pastLOV_MAXPOOLNAMEcharacters with no NUL terminator to save it. it simply would not stop. πENXIOβ the name wasNULLor empty. nothing. a void. an empty plate. π
π EXAMPLES π
checking if pool_name can actually be used as a pool identifier, let's go π
#include <string.h>
#include <lustre/lustreapi.h>
int main(int argc, char *argv[])
{
char pool_name[] = "newfs123.testpool";
rc = llapi_pool_name_validate(&pool_name);
if (rc < 0) {
fprintf(stderr, "%s: pool name '%s' invalid: %s\n",
argv[1], pool_name, strerror(errno));
return rc;
}
}
π AVAILABILITY π
llapi_pool_name_validate has been part of the lustre(7) filesystem package since release 2.18.0 β so it's been serving looks for a minute now π
π«Ά SEE ALSO π«Ά
llapi_name_validate(3), lustreapi(7)
and that's the whole page bestie, no cap π§ this lil rewrite came to you from the Lustre User API, dated 2026-08-23 β original LLAPI_POOL_NAME_VALIDATE(3) energy, just with way more sparkle β¨ mwah, go validate those pool names π
π¦ 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