LLAPI_GROUP_LOCK(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

✨ 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_lock and llapi_group_unlock were added in release 2.7.0. OG behaviour. πŸ‘‘
  • llapi_group_lock64 and llapi_group_unlock64 were added in release 2.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