locks_start_grace(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… locks_start_grace(9) โ€” Kernel API Manual, bestie edition โœจ

okay so real talk, this one lives in the Kernel API Manual and it's literally the "start the grace period" button. that's the whole vibe. let's get into it ๐ŸŽ€


๐ŸŒธ NAME

locks_start_grace โ€” and ngl the original page just leaves the description blank after the dash, so likeโ€ฆ the name is the name. it starts a grace period. iconic of it, honestly. ๐Ÿซถ


โœจ SYNOPSIS

void locks_start_grace (struct net *net , struct lock_manager *lm );

that's it, that's the whole signature. no return value, it's giving void and unbothered. ๐Ÿ’…


๐Ÿฆ‹ ARGUMENTS

  • net โ€” the net namespace that this lock manager belongs to. like, whose world are we in? that one. ๐ŸŒˆ
  • lm โ€” who this grace period is for. the lock manager in question. it's giving main character energy, because the grace period is literally about them. ๐Ÿ‘‘

๐Ÿ’– DESCRIPTION

okay so first things first, what even is a grace period? it's a period during which locks should not be given out. that's the whole definition, no cap. ๐Ÿšซ๐Ÿ”’

currently, grace periods are only enforced by the two lock managers โ€” that's lockd and nfsd โ€” and they do it by using the locks_in_grace function to check when they're in a grace period. so locks_in_grace is the vibe check function, and it's doing the actual enforcing. ๐Ÿ’€

and this function right here? locks_start_grace? it's called to start a grace period. that's the whole job. short, sweet, slays. periodt. ๐Ÿ”ฅ


๐Ÿงš SEE ALSO

  • Kernel file ./fs/nfs_common/grace.c โ€” the source, go read it bestie ๐Ÿ“–
  • locks_end_grace(9) โ€” the other half of the story, the closing chapter ๐ŸŽฌ
  • locks_in_grace(9) โ€” the checker, the vibe check, the "are we in a grace period rn" oracle ๐Ÿ”ฎ

lowkey a tiny function with a big responsibility. don't sleep on it. ๐Ÿ’œ

โœฟ and that's the page! brought to you by ./fs/nfs_common, October 2026, and the one and only locks_start_grace(9) โ€” mwah, go start some grace periods responsibly ๐Ÿ“โœจ

๐Ÿ“ฆ where this page comes from