gfs2_reserv...k_and_update(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gfs2_reservation_check_and_update β€” kernel API manual, bestie ✨

okay so real talk, this one lives in the Kernel API Manual, and the page header is literally gfs2_reserv...k_and_update(9) (yes the header truncates it, that's just how it's printed, don't come for me 🫢). The full-grown function name is gfs2_reservation_check_and_update, and we're about to get into it.


🌸 NAME 🌸

gfs2_reservation_check_and_update β€” check for reservations during block alloc πŸ’«


πŸŽ€ SYNOPSIS πŸŽ€

int gfs2_reservation_check_and_update (struct gfs2_rbm *rbm , struct gfs2_blkreserv *rs , u32 minext , struct gfs2_extent *maxext );

like, four args, one int coming back, it's giving function signature realness πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • rbm β€” the current position in the resource group πŸ“ this is where we're standing rn
  • rs β€” our own reservation 🫢 yeah, ours, main character reservation energy
  • minext β€” the minimum extent length πŸ“ the smallest we're willing to accept, no lowballing
  • maxext β€” a pointer to the maximum extent structure πŸ”₯ pointer bestie, so it's pointing at the max extent struct

✨ DESCRIPTION ✨

so basically πŸ’… this function checks the current position in the rgrp to see whether there is a reservation covering this block. that's the whole vibe check.

if there is not one? then this function is a no-op. literally nothing happens, iconique, we move on with our lives 😌

but if there is one? then the position gets moved to the end of the contiguous reservation(s), so that we are pointing at the first non-reserved block. like sliding past the whole reserved block party until we hit the first block that isn't on the list πŸŽ‰


⭐ RETURN ⭐

  • 0 β€” if no reservation πŸ™ˆ
  • 1 β€” if rbm has changed πŸ‘€ (she moved, she's different now)
  • otherwise β€” an error πŸ’€ (not me getting a random error value, but okay)

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./fs/gfs2/rgrp.c β€” home base 🏠 β€” plus this absolutely stacked friend group of functions, all (9), all iconic, all in the original order:

like that's 49 functions, we are obsessed with the cross-referencing 🌈


and that's the whole page bestie, hope it slayed for you πŸ’–

source path is ./fs/gfs2, dated October 2026 β€” mwah, catch you in the next manpage πŸŽ€πŸ¦‹βœ¨
πŸ“¦ where this page comes from