lockd_set_file_lock_range4(9)
π NAME π
okay bestie, welcome to lockd_set_file_lock_range4(9) from the Kernel API Manual β it's giving tiny-but-iconic byte-range conversion, and we're gonna get through it together. π
β¨
lockd_set_file_lock_range4 β set the byte range of a file_lock. That's literally the whole assignment, and it ate. π«Ά
β¨ SYNOPSIS β¨
void lockd_set_file_lock_range4 (struct file_lock *fl , u64 off , u64
len );
yep, it returns void; no return value to obsess over. π
π ARGUMENTS π
flβ thefile_lockwhose length fields are to be initialized. main character struct energy, fr fr. πoffβ starting offset of the lock, in bytes. keep it exact, bestie.lenβ length of the byte range, in bytes, or zero. yes, zero is allowed and it matters. π
π¦ DESCRIPTION π¦
The NLMv4 protocol represents lock byte ranges as (start, length), and in that world length zero means "lock to end of file." π The kernel's file_lock structure, though, uses a (start, end) representation β different setup, bestie. So this function converts from NLMv4 format to file_lock format, clamping the starting offset and treating arithmetic overflow as "lock to EOF." No cap, that overflow rule is literally part of the conversion. π§
πΈ SEE ALSO πΈ
- Kernel file
./fs/lockd/lockd.h lockd_set_file_lock_range3(9)
mwah π β source/version: ./fs/lockd, dated October 2026, and this page is lockd_set_file_lock_range4(9). periodt, bestie. π
π¦ 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