VOP_ADVLOCK(9)
π VOP_ADVLOCK β advisory record locking π
okay bestie, welcome to the VOP_ADVLOCK(9) page from the Kernel Developer's Manual β yes we're in kernel land today, get comfy, it's giving β¨serious businessβ¨ but make it cute.
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/vnode.h>
#include <sys/fcntl.h>
#include <sys/lockf.h>
int
VOP_ADVLOCK(struct vnode *vp, caddr_t id, int op, struct flock *fl,
int flags);
π DESCRIPTION π
so basically this entry point manipulates advisory record locks on the file. no cap. and here's the tea β most file systems just delegate the whole thing to lf_advlock() and call it a day. iconic behaviour honestly π«Ά
now let's meet the arguments, one by one, like a little friend group:
vpβ the vnode being manipulated. that's the main character right there πidβ the id token which is changing the lock. it's the one doing the changing, okay?? let it cook.opβ the operation to perform (peepfcntl(2)for the deets).flβ description of the lock. literally describing the lock. so descriptive.flagsβ one of more of the following (yes, we're listing all of them, no skips, we don't do that here):F_WAITβ wait until lock is granted. patience is a virtue babe π§F_FLOCKβ useflock(2)semantics for lock.F_POSIXβ use POSIX semantics for lock.F_REMOTEβ lock owner is remote NFS client. long distance relationship vibes πF_NOINTRβ mask signals while waiting for the lock.
β¨ RETURN VALUES β¨
zero on success. anything else = error, and we hate that for you π. literally zero is the slay, everything else is the flop.
π¦ SEE ALSO π¦
π AUTHORS π
This manual page was written by Doug Rabson. thank you Doug, you ate fr fr π β¨
and that's the whole page bestie, mwah π this was Debian's drop from May 27, 2019, part of the VOP_ADVLOCK(9) saga β go forth and lock responsibly π«Άπ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1996 Doug Rabson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms