lockd_set_file_lock_range3(9)
π lockd_set_file_lock_range3(9) π
okay so bestie, this is the lockd_set_file_lock_range3(9) page from the Kernel API Manual β yes, we're doing kernel lock ranges today and it's lowkey iconic β¨
πΈ NAME πΈ
lockd_set_file_lock_range3 β set the byte range of a file_lock
π¦ SYNOPSIS π¦
void lockd_set_file_lock_range3 (struct file_lock *fl , u32 off , u32
len );
π ARGUMENTS π
flβ thefile_lockwhose length fields are to be initialized π«Άoffβ starting offset of the lock, in byteslenβ length of the byte range, in bytes, or zero
β¨ DESCRIPTION β¨
okay so here's the tea: NLMv3 uses a (start, length) representation for lock byte ranges, while the kernel's file_lock uses (start, end). literally two different vibes bestie π
Treat a length of zero or arithmetic overflow β that's when end wraps negative because the sum exceeds S32_MAX β as "lock to end of file." π
no cap: zero length and that overflow case both mean the lock goes all the way to the end of the file. periodt.
π₯ SEE ALSO π₯
- Kernel file
./fs/lockd/lockd.h lockd_set_file_lock_range4(9)
mwah π this page's source/version is ./fs/lockd, its date is October 2026, and it's all about lockd_set_file_lock_range3(9) β bye bestie, go set those ranges! π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms