LLAPI_GROUP_LOCK(3)
β¨ LLAPI_GROUP_LOCK(3) β¨
okay bestie, gather round π this one lives in the Lustre Library Functions corner of the manual (section 3, the library-call girlies), and it's literally just: get a group lock, put a group lock. that's the whole vibe. no cap.
πΈ NAME πΈ
llapi_group_lock, llapi_group_unlock, llapi_group_lock64, llapi_group_unlock64 β get and put a Lustre group lock. π
π SYNOPSIS π
#include <lustre/lustreapi.h>
int llapi_group_lock(int fd, int gid);
int llapi_group_lock64(int fd, __u64 gid);
int llapi_group_unlock(int fd, int gid);
int llapi_group_unlock64(int fd, __u64 gid);
π¦ DESCRIPTION π¦
so the way this works, bestie:
llapi_group_lock() and llapi_group_lock64() take a group lock on the file descriptor fd with group identifier gid (which is either an int or a __u64 type, depending on which one you call, obviously π
).
llapi_group_unlock() and llapi_group_unlock64() release a group lock identified by group identifier gid (again, int or __u64 type) on the file descriptor fd. give it back, girl. π«Ά
and now the actual tea β β the group lock is a whole file lock that blocks concurrent I/O originating from descriptors that have not been locked. so if you didn't lock it, you're not doing I/O to it, periodt. π
but here's the slay part: multiple processes can acquire a lock by specifying the same group identifier. yes bestie, it's a group chat. everyone with the same gid gets in. π
π RETURN VALUES π
llapi_group_lock(), llapi_group_lock64(), llapi_group_unlock() and llapi_group_unlock64() all return 0 on success, or a negative errno value on failure. π
π₯ ERRORS π₯
-EBADFβ fd is not a valid file descriptor. it's giving fake ID. π-ENOTTYβ fd does not describe an object suitable for this request. wrong girl, wrong function. π-EINVALβ fd is already group locked with a different group identifier. you're already in a different group chat, babe, pick one. π€
π AVAILABILITY π
llapi_group_lock(), llapi_group_unlock(), llapi_group_lock64() and llapi_group_unlock64() are all part of the lustre(7) user application interface library. iconic. β¨
timeline check, because we love an origin story:
llapi_group_lockandllapi_group_unlockwere added in release2.7.0. OG behaviour. πllapi_group_lock64andllapi_group_unlock64were added in release2.15.0. the 64-bit glow-up, we love to see it. π
β SEE ALSO β
and that's the whole page, bestie, you ate that π mwah π
written by the Lustre User API girlies, dated 2024-08-27 β catch you in the next manpage, ily, bye ππ¦β¨
π¦ 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