gfs2_rindex_update(9)
πΈ gfs2_rindex_update(9) β like, the Kernel API Manual page, bestie β¨
okay so real talk, this is from the Kernel API Manual, and the whole thing is about gfs2_rindex_update π
buckle up.
β¨ NAME β¨
gfs2_rindex_update β Update the rindex if required π¦
π SYNOPSIS π
int gfs2_rindex_update (struct gfs2_sbd *sdp );
π ARGUMENTS π
sdpβ The GFS2 superblock. that's it, that's the whole argument, she's simple and she knows it π
π₯ DESCRIPTION π₯
okay so the way this works: we grab a lock on the rindex inode to make sure it doesn't change whilst we are performing an operation π literally cannot have it shifting under us mid-operation, that would be so rude.
and yeah, we keep this lock for quite long periods of time compared to other locks. is that a problem? no bestie, it's giving totally fine, because the lock is shared, and it is very, very rarely accessed in the exclusive mode β like, only when expanding the filesystem. that's the only time. iykyk π«
this makes sure that we're using the latest copy of the resource index special file, which might have been updated if someone expanded the filesystem (via the gfs2_grow utility), which adds new resource groups. so like, new resource groups show up, and we're not out here reading the stale version like a clown π€‘ no cap.
β RETURN β
0 on succeess, error code otherwise. (yes the typo is canon, she's iconic, we stan πβ¨)
π SEE ALSO π
Kernel file ./fs/gfs2/rgrp.c β and then, like, the entire extended friend group:
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_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), 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, go read rgrp.c bestie, it's all in there π«Ά
and that's the whole page!! shoutout to ./fs/gfs2 for being the source, October 2026 for the date, and the Kernel API Manual for hosting this absolute icon of a manpage ππ
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