nlm4svc_proc_nm_lock(9)
πΈ 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 anNLMPROC4_GRANTEDcallback 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:
nlm4svc_proc_null(9)nlm4svc_proc_test(9)nlm4svc_proc_lock(9)nlm4svc_proc_cancel(9)nlm4svc_proc_unlock(9)nlm4svc_proc_granted(9)nlm4svc_proc_test_msg(9)nlm4svc_proc_lock_msg(9)nlm4svc_proc_cancel_msg(9)nlm4svc_proc_unlock_msg(9)nlm4svc_proc_granted_msg(9)nlm4svc_proc_granted_res(9)nlm4svc_proc_sm_notify(9)nlm4svc_proc_unused(9)nlm4svc_proc_share(9)nlm4svc_proc_unshare(9)nlm4svc_proc_free_all(9)
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
- 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