request_demote(9)
π
request_demote(9) β the request_demote page, bestie edition
okay so this is a page from the Kernel API Manual (yes, request_demote(9), the 9 is the manual section, slay) and it's literally all about handling a demote request. it's short, it's cute, and it's giving "I know exactly what I'm doing" energy. let's get into it π
β¨ NAME β¨
request_demote β process a demote request π¦
like, that's the whole job. it processes a demote request. periodt.
πΈ SYNOPSIS πΈ
void request_demote (struct gfs2_glock *gl , unsigned int state ,
unsigned long delay , bool remote );
look at her. four params, returns nothing (void), absolutely not here to give you a value back. she's a doer, not a talker π
π§ ARGUMENTS π§
glβ the glock. yes. that glock. thestruct gfs2_glock *one you just handed over π«Άstateβ the state the caller wants us to change to. i.e. where they want to end up, and we're the ones making it happen β¨delayβ zero to demote immediately; otherwise pending demote. so like,0= no thoughts head empty go now, anything else = we're queuing this up for later β³remoteβtrueif this came from a different cluster node. so if it'strue, bestie, this request literally travelled across the cluster to get here π
π DESCRIPTION π
okay so here's the tea π: in actual practise there are only two requests that we are going to see:
LM_ST_SHAREDLM_ST_UNLOCKED
that's it. those two. only those. "only two requests that we are going to see in actual practise" β direct quote, and honestly? iconic. we love a small, well-defined set of possibilities. no chaos, no surprises, just two states and vibes π
π₯ SEE ALSO π₯
so this one lives in the Kernel file ./fs/gfs2/glock.c and honestly the whole friend group shows up here. roll call π:
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)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_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 i said. the whole group chat. go read them, iykyk π
ngl the entire page is nine lines of facts and i respect that so much. no filler, no fluff, just glock demotion and a link dump. main character energy fr fr π
and that's the whole page bestie!! π source & version: ./fs/gfs2, dated October 2026, and the page itself is request_demote(9) β mwah, go demote something, love you, bye πβ¨π¦
π¦ 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