try_rgrp_unlink(9)
π try_rgrp_unlink β the kernel API manual moment π
okay so bestie, we're in the Kernel API Manual and today's main character is try_rgrp_unlink(9). yes the whole page is about one function, and yes it's iconic. let's get into it β¨
β¨ NAME β¨
try_rgrp_unlink β literally goes looking for any unlinked, allocated, but unused inodes ππ
like. the trinity of "why is this still here". no cap.
π¦ SYNOPSIS π¦
void try_rgrp_unlink (struct gfs2_rgrpd *rgd , u64 *last_unlinked , u64
skip );
that's the whole signature, copy it exactly, don't be cute with it π«Ά
πΈ ARGUMENTS πΈ
rgdβ the rgrp. that's it, that's the description. it's giving "minimalist icon" πlast_unlinkedβ the block address of the last dinode we unlinked. the "where we left off" of it all πskipβ a block address we should explicitly not unlink. hands off, bestie π
π RETURN π
0 if no error. and the inode, if one has been found, in inode. π (yes, inode β that's what the page says, we don't editorialize, we just report π«‘)
π SEE ALSO π
the friend group is huge, buckle up:
- Kernel file:
./fs/gfs2/rgrp.c 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_reservation_check_and_update(9)gfs2_rbm_find(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)
all of them. every single one. iykyk π
ngl this page is short but it ate. go read rgrp.c if you want the full lore π
and that's the vibe check, bestie β brought to you from ./fs/gfs2, dated October 2026, filed under try_rgrp_unlink(9). slay, periodt, and don't forget to unlink responsibly π§π
π¦ 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