gfs2_next_unreserved_block(9)
π gfs2_next_unreserved_block β Kernel API Manual, section 9 π¦
okay so bestie, we're in the kernel API manual (section 9, the fun one) and today's main character is gfs2_next_unreserved_block β¨
πΈ NAME πΈ
gfs2_next_unreserved_block β returns the next block that is not reserved, no cap π
β¨ SYNOPSIS β¨
u64 gfs2_next_unreserved_block (struct gfs2_rgrpd *rgd , u64 block , u32
length , struct gfs2_blkreserv *ignore_rs );
literally just copy that signature exactly, don't be weird about it π«Ά
π ARGUMENTS π
rgdβ the resource group. yes. that one. πblockβ the starting block, aka where we begin the hunt π΅οΈββοΈlengthβ the required length. we need this much, fr fr πignore_rsβ the reservation to ignore π like we're pretending it's not even there
π DESCRIPTION π
so here's the vibe check π₯ if the block does not appear in any reservation, then we return the block number unchanged β no notes, no edits, she stays exactly as she came in π
but if it does appear in the reservation? that's when we go looking π we keep looking through the tree of reservations in order to find the first block number which is not reserved. that's the whole gig. that's the mission. slay π
π§ SEE ALSO π§
kernel file ./fs/gfs2/rgrp.c β and the entire group chat of friends, all present and accounted for, nobody left on read:
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_reservation_check_and_update(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β¦ fifty of them?? and every single one made the list. iconic behavior honestly ππ
lowkey reminder bestie: this page is living in ./fs/gfs2 and it's stamped October 2026 β that's the source folder and the date, keep them safe π«Ά
and that's the page!! mwah π β signed off from the Kernel API Manual, gfs2_next_unreserved_block(9), dated October 2026, source ./fs/gfs2. periodt. π
π¦ 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