nfsd4_layout...ker_timedout(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nfsd4_layout_lm_breaker_timedout β€” the layout recall has timed out

okay so this is a page from the Kernel API Manual, section 9 β€” yes bestie, that's the kernel-internals girlies section, we're in the deep end and it's honestly iconic of us. let's get into it 🫢


✨ SYNOPSIS ✨

bool nfsd4_layout_lm_breaker_timedout(struct file_lease *fl);

like, one function, one argument, one bool coming back out. clean. minimal. main character energy πŸŽ€


🌸 ARGUMENTS 🌸

  • fl β€” the file to check. that's it, that's the whole vibe. she's just here to be inspected πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the situation, bestie: the layout recall has timed out. and now we gotta do something about it.

if the layout type supports a fence operation, we schedule a worker to fence the client off from accessing the block device. yes, fence, like literally putting up a fence. no cap πŸ”₯

this function runs under the protection of the spin_lock flc_lock. at this time, the file_lease associated with the layout stateid is on the flc_list. a reference count is incremented on the layout stateid so it doesn't get freed while the fence worker is doing its thing β€” can't have her getting deleted mid-shift, that would be so embarrassing 😭 β€” and once the fence worker finishes its operation, it releases that reference. responsible queen behavior fr fr πŸ’…

the fence worker keeps running until either the client has been fenced, or the layout becomes invalid. and how does a layout become invalid, you ask? good question, i'm obsessed with you:

  • it can go invalid as a result of a LAYOUTRETURN
  • or when the CB_LAYOUT recall callback has completed

periodt. those are the two ways. 🧚

Returns true if the file_lease should be disposed of by the caller; otherwise, returns false. so, like, the return value is basically the function going "she's yours now, handle it" or "nah, i got this." 🌈


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’€ quick vibe check reminder: this whole thing is kernel-level business, so respect the locking. flc_lock is not a suggestion, she's a requirement.

and that's the page!! mwah πŸ’– this gem lives in ./fs/nfsd, dated October 2026 β€” future girlies will be reading this and honestly? they're gonna slay with it. πŸ“βœ¨

πŸ“¦ where this page comes from