rgd_free(9)
π¦ rgd_free(9) β the Kernel API Manual page, bestie edition β¨
okay so this is a page from the Kernel API Manual and it's all about rgd_free, which ngl is a whole little icon in the GFS2 resource-group world. sit down, grab a strawberry π, we're learning.
πΈ NAME πΈ
rgd_free β literally just returns the number of free blocks we can allocate π
β¨ SYNOPSIS β¨
u32 rgd_free (struct gfs2_rgrpd *rgd , struct gfs2_blkreserv *rs );
that's the whole signature, no cap β it gives you back a u32 π«Ά
π ARGUMENTS π
rgdβ the resource group π this is the rgrp we're doing the math on.rsβ the reservation to free π
π§ DESCRIPTION π§
okay so here's the vibe: this function returns the number of free blocks for an rgrp. periodt.
and like, which free blocks? the clone-free blocks β that means blocks that are free, not counting the ones still being used for unlinked files that haven't been deleted yet. they're lowkey still busy, so they don't count π
it also subtracts any blocks that somebody else reserved, because those are spoken for, not yours, respect the boundaries bestie π
but β and this is the main character detail β it does not include free blocks that are still part of our current reservation. why? because obviously we can (and will) allocate them. it's giving "yes that's mine, next question" π₯
π SEE ALSO π
this list is long and honestly iconic, so buckle up π¦ it's the Kernel file ./fs/gfs2/rgrp.c plus, like, everyone it hangs out with:
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),rg_mblk_search(9),gfs2_next_unreserved_block(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 I said. everyone. ate and left no crumbs π
ngl this page never actually says anything is dangerous or deprecated, so no scary warnings here β just know that clone-free genuinely means "not counting those unlinked-file blocks," that's the whole point of the distinction π«Ά
k bye ily, this page lives in ./fs/gfs2 and it's dated October 2026, so mark your calendar and stan a filesystem ππ
π¦ 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