nq_m_sync(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nq_m_sync(9) β€” from the Kernel API Manual, bestie ✨

Okay so imagine you need multiple glocks at once and you're like "pls don't deadlock on me πŸ₯Ί" β€” that's literally this function. It's the synchronous, deadlock-free-order glock-hauling queen of the GFS2 kernel API. πŸ‘‘


✨ NAME ✨

nq_m_sync β€” synchronously acquire more than one glock in deadlock free order 🫢


🌸 SYNOPSIS 🌸

int nq_m_sync (unsigned int num_gh , struct gfs2_holder *ghs , struct
gfs2_holder **p );

πŸŽ€ ARGUMENTS πŸŽ€

  • num_gh β€” the number of structures πŸ“ (yes, the count, she counts)
  • ghs β€” an array of struct gfs2_holder structures ✨
  • p β€” placeholder for the holder structure to pass back πŸ’Œ

πŸ’– RETURN πŸ’–

  • 0 on success β€” i.e. all glocks acquired, slay πŸ’…
  • errno on failure β€” and no cap, no glocks acquired 😭 (all-or-nothing energy fr fr)

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./fs/gfs2/glock.c β€” that's where the magic lives, go read it πŸ“–βœ¨


Reminder bestie: the whole point is the deadlock free order part β€” that's the main character energy of this function, don't sleep on it πŸ’€βœ¨

Okay that's the whole page, mwah 🫢 β€” brought to you by the fine folks at ./fs/gfs2, dated October 2026, and the page itself is nq_m_sync(9) in case you forgot already (no judgement, it's a lot of glocks) πŸŒˆπŸ’œ

πŸ“¦ where this page comes from