gfs2_glock_nq(9)
π« gfs2_glock_nq β like, the Kernel API Manual era π«
okay bestie, so this one lives in the Kernel API Manual and it's called gfs2_glock_nq(9). it's giving "lock queue energy" and honestly? kinda iconic.
β¨ NAME β¨
gfs2_glock_nq β enqueue a struct gfs2_holder onto a glock, which is the fancy way of saying acquire a glock. yeah. that's the whole vibe. π
π¦ SYNOPSIS π¦
int gfs2_glock_nq (struct gfs2_holder *gh );
one function, one argument, zero drama (well, mostly β see RETURN below π).
π ARGUMENTS π
ghβ the holder structure. that's it. that's the whole argument list. she's a one-holder-argument kind of function and we respect her π«Ά
πΈ DESCRIPTION πΈ
okay so the entire description is literally this:
if (gh->gh_flags & GL_ASYNC), this never returns an error
that's the whole thing. no cap. if you set the GL_ASYNC flag in gh->gh_flags, this call is never gonna hand you back an error β it's asynchronous, she's doing her own thing, main character energy β¨. just know that up front so you don't sit there error-checking something that's never gonna error π
π RETURN π
she returns one of these, so keep your eyes peeled:
0GLR_TRYFAILED- or an
errnoon failure π
(reminder from above: with GL_ASYNC in gh->gh_flags, it does not return an error β so the error branch is a non-async only kinda situation, iykyk)
π SEE ALSO π
this list is LONG and honestly she ate β the whole glock friend group showed up:
Kernel file ./fs/gfs2/glock.cwake_up_glock(9)gfs2_glock_hold(9)gfs2_glock_put(9)may_grant(9)do_error(9)find_first_holder(9)do_promote(9)find_first_waiter(9)find_last_waiter(9)state_change(9)finish_xmote(9)do_xmote(9)run_queue(9)glock_set_object(9)glock_clear_object(9)gfs2_glock_get(9)__gfs2_holder_init(9)gfs2_holder_reinit(9)gfs2_holder_uninit(9)gfs2_glock_holder_ready(9)gfs2_glock_wait(9)gfs2_glock_async_wait(9)request_demote(9)add_to_queue(9)gfs2_glock_poll(9)gfs2_glock_dq(9)gfs2_glock_dq_uninit(9)gfs2_glock_nq_num(9)glock_compare(9)nq_m_sync(9)gfs2_glock_nq_m(9)gfs2_glock_dq_m(9)gfs2_should_freeze(9)gfs2_glock_complete(9)glock_hash_walk(9)thaw_glock(9)gfs2_glock_thaw(9)gfs2_wait_glocks(9)dump_holder(9)gfs2_dump_glock(9)
like, go read those too. or don't. but likeβ¦ do π§
ok that's the whole page, no notes, go enqueue something π₯
and that's a wrap, bestie π this little gem comes to you from ./fs/gfs2, dated October 2026, and it's page gfs2_glock_nq(9) of the Kernel API Manual. slay, go touch some glocks π
π¦ 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