gfs2_reserv...k_and_update(9)
π gfs2_reservation_check_and_update β kernel API manual, bestie β¨
okay so real talk, this one lives in the Kernel API Manual, and the page header is literally gfs2_reserv...k_and_update(9) (yes the header truncates it, that's just how it's printed, don't come for me π«Ά). The full-grown function name is gfs2_reservation_check_and_update, and we're about to get into it.
πΈ NAME πΈ
gfs2_reservation_check_and_update β check for reservations during block alloc π«
π SYNOPSIS π
int gfs2_reservation_check_and_update (struct gfs2_rbm *rbm , struct gfs2_blkreserv *rs , u32 minext , struct gfs2_extent *maxext );
like, four args, one int coming back, it's giving function signature realness π
π¦ ARGUMENTS π¦
rbmβ the current position in the resource group π this is where we're standing rnrsβ our own reservation π«Ά yeah, ours, main character reservation energyminextβ the minimum extent length π the smallest we're willing to accept, no lowballingmaxextβ a pointer to the maximum extent structure π₯ pointer bestie, so it's pointing at the max extent struct
β¨ DESCRIPTION β¨
so basically π this function checks the current position in the rgrp to see whether there is a reservation covering this block. that's the whole vibe check.
if there is not one? then this function is a no-op. literally nothing happens, iconique, we move on with our lives π
but if there is one? then the position gets moved to the end of the contiguous reservation(s), so that we are pointing at the first non-reserved block. like sliding past the whole reserved block party until we hit the first block that isn't on the list π
β RETURN β
0β if no reservation π1β ifrbmhas changed π (she moved, she's different now)- otherwise β an error π (not me getting a random error value, but okay)
π₯ SEE ALSO π₯
kernel file ./fs/gfs2/rgrp.c β home base π β plus this absolutely stacked friend group of functions, all (9), all iconic, all in the original order:
gfs2_setbit(9)gfs2_testbit(9)gfs2_bit_search(9)rs_cmp(9)gfs2_bitfit(9)gfs2_rbm_from_block(9)gfs2_rbm_add(9)gfs2_unaligned_extlen(9)gfs2_free_extlen(9)gfs2_bitcount(9)gfs2_rgrp_verify(9)gfs2_blk2rgrpd(9)gfs2_rgrpd_get_first(9)gfs2_rgrpd_get_next(9)__rs_deltree(9)gfs2_rs_deltree(9)gfs2_rs_delete(9)return_all_reservations(9)compute_bitstructs(9)gfs2_ri_total(9)read_rindex_entry(9)set_rgrp_preferences(9)gfs2_ri_update(9)gfs2_rindex_update(9)gfs2_rgrp_go_instantiate(9)gfs2_rgrp_brelse(9)gfs2_fitrim(9)rs_insert(9)rgd_free(9)rg_mblk_search(9)gfs2_next_unreserved_block(9)gfs2_rbm_find(9)try_rgrp_unlink(9)gfs2_rgrp_congested(9)gfs2_rgrp_used_recently(9)fast_to_acquire(9)gfs2_inplace_reserve(9)gfs2_inplace_release(9)gfs2_alloc_extent(9)rgblk_free(9)gfs2_rgrp_dump(9)gfs2_adjust_reservation(9)gfs2_set_alloc_start(9)gfs2_alloc_blocks(9)__gfs2_free_blocks(9)gfs2_free_meta(9)gfs2_check_blk_type(9)gfs2_rlist_add(9)gfs2_rlist_alloc(9)gfs2_rlist_free(9)
like that's 49 functions, we are obsessed with the cross-referencing π
and that's the whole page bestie, hope it slayed for you π
source path is ./fs/gfs2, dated October 2026 β mwah, catch you in the next manpage ππ¦β¨
π¦ 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