nlm4svc_proc_nm_lock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 nlm4svc_proc_nm_lock β€” the Kernel API Manual, section 9 ✨

okay so bestie, gather round, because we're diving into nlm4svc_proc_nm_lock(9) β€” yes that's the section 9 kernel API manual, and yes it's giving "niche but iconic." This is the NM_LOCK proc, aka Establish a non-monitored lock. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

__be32 nlm4svc_proc_nm_lock (struct svc_rqst *rqstp );

like… that's the whole signature. short and slay.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • rqstp β€” the RPC transaction context. that's it, that's the one argument. she's lowkey carrying the whole request on her shoulders πŸ’–

⭐ RETURN ⭐

  • rpc_success β€” RPC executed successfully. we love a clean win πŸŽ‰
  • rpc_drop_reply β€” do not send an RPC reply. no reply, no problem, we're ghosting the client πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

okay so the RPC synopsis goes like this, no cap:

nlm4_res NLMPROC4_NM_LOCK(nlm4_lockargs) = 22;

Permissible procedure status codes, bestie, listen up β€” these are the ones you're allowed to return:

  • NLM4_GRANTED β€” the requested lock was granted. periodt. lock secured πŸ‘‘
  • NLM4_DENIED β€” the requested lock conflicted with existing lock reservations for the file. somebody else got there first 😭
  • NLM4_DENIED_NOLOCKS β€” the server could not allocate the resources needed to process the request. she's out of budget, literally πŸ’€
  • NLM4_BLOCKED β€” the blocking request cannot be granted immediately. the server will send an NLMPROC4_GRANTED callback to the client when the lock can be granted. so like… not right now, but circle back 🫢
  • NLM4_DENIED_GRACE_PERIOD β€” the server has recently restarted and is re-establishing existing locks, and is not yet ready to accept normal service requests. she's in her healing era, give her a sec 🌸

and the Linux NLM server implementation also returns these extra ones β€” the deluxe edition:

  • NLM4_DEADLCK β€” the request could not be granted and blocking would cause a deadlock. mutually assured destruction, we're not doing that 🚫
  • NLM4_STALE_FH β€” the request specified an invalid file handle. expired, stale, not the vibe πŸ₯€
  • NLM4_FBIG β€” the request specified a length or offset that exceeds the range supported by the server. too big, too much, over it πŸ’…
  • NLM4_FAILED β€” the request failed for an unspecified reason. it's giving mystery, it's giving "we don't know either" πŸ˜΅β€πŸ’«

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./fs/lockd/svc4proc.c β€” go read the source, iykyk β€” plus her entire friend group:


and that's the page bestie!! 🌈 this little gem lives in ./fs/lockd and it was dated October 2026 β€” mark your calendars, she's a time traveler πŸ•°οΈβœ¨ mwah, study hard, and don't forget to actually send the reply (unless it's rpc_drop_reply, in which case absolutely do not) πŸŽ€πŸ’–

πŸ“¦ where this page comes from