rgd_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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:

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