gfs2_inplace_reserve(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 gfs2_inplace_reserve(9) 🌸

okay so bestie, welcome to the Kernel API Manual page for gfs2_inplace_reserve(9) β€” yes it's a real function, yes it's a whole vibe, and yes we're gonna get through it together πŸ’–


✨ NAME ✨

gfs2_inplace_reserve β€” reserve space in the filesystem πŸŽ€ literally what it says on the tin, no cap


πŸ¦‹ SYNOPSIS πŸ¦‹

int gfs2_inplace_reserve (struct gfs2_inode *ip , struct
gfs2_alloc_parms *ap );

πŸ’… ARGUMENTS πŸ’…

  • ip β€” the inode you're reserving space for, bestie. it's giving "this is the main character" πŸ‘‘
  • ap β€” the allocation parameters. all the little settings that tell the function what it's working with ✨

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜•: we try our best to find an rgrp that has at least ap->target blocks available. like, we're really out here giving it our all πŸ’ͺ

after a couple of passes (loops == 2), the prospects of finding such an rgrp diminish 😭 at this stage, we return the first rgrp that has at least ap->min_target blocks available. lower the bar, get the result β€” that's the strategy, periodt πŸ’…


🌈 RETURN 🌈

  • 0 on success β€” slay πŸŽ‰
  • -ENOMEM if a suitable rgrp can't be found β€” not the vibe, ngl πŸ’€
  • errno otherwise β€” the usual "something else went sideways" energy πŸ™ˆ

⭐ SEE ALSO ⭐

bestie, strap in, this list is long β€” but every single one matters, iykyk 🫢

kernel file ./fs/gfs2/rgrp.c, plus: 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), try_rgrp_unlink(9), gfs2_rgrp_congested(9), gfs2_rgrp_used_recently(9), fast_to_acquire(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)


and that's the whole page, bestie πŸ§šπŸ’œ this little gem lives in ./fs/gfs2 β€” the October 2026 edition ✨ go forth and reserve your space, queen πŸ‘‘πŸ’–

πŸ“¦ where this page comes from