gfs2_glock_nq_m(9)
π gfs2_glock_nq_m(9) β like, the Kernel API Manual page, bestie
okay so real talk, this one lives in the Kernel API Manual and it's the glow-up you call when one glock just isn't enough. multiple glocks?? at once?? we love a multitasker. β¨
πΈ NAME πΈ
gfs2_glock_nq_m β acquire multiple glocks π«Ά
π SYNOPSIS π
int gfs2_glock_nq_m (unsigned int num_gh , struct gfs2_holder *ghs );
like. that's it. that's the whole vibe. int in, int out, glocks acquired. π
β¨ ARGUMENTS β¨
num_ghβ the number of structures, fr fr. it's anunsigned int, so keep it cute and non-negative. it's literally telling the function how many holders are in your little array. πghsβ an array ofstruct gfs2_holderstructures. an array, bestie, not a single one. this is the group chat of holders. π
π₯ RETURN π₯
0on success β meaning all glocks acquired. every single one. ate. πerrnoon failure β and here's the tea: on failure, no glocks acquired. zero. it's all-or-nothing, bestie, no half-vibes. π
π SEE ALSO π
Kernel file ./fs/gfs2/glock.c, and honestly the whole glock friend group:
wake_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_nq(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_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 yes that's a lot of friends but they're all iconic in their own way, iykyk π§
ngl if you're calling this from a kernel module you already know what you're doing, so go off. just remember: all glocks or no glocks. no in-between. π©·
and that's the page!! source dir was ./fs/gfs2, dated October 2026 β mwah, catch you on the next one bestie ππ¦πΈ
π¦ 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