lockd_set_file_lock_range4(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the file_lock whose 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 🌸

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