gfs2_rbm_find(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– gfs2_rbm_find(9) πŸ’–

okay so welcome to the Kernel API Manual (bestie edition, iykyk ✨)


✨ NAME ✨

gfs2_rbm_find β€” look for blocks of a particular state (the way it just finds them, no cap πŸ’…)


🌸 SYNOPSIS 🌸

       int gfs2_rbm_find (struct gfs2_rbm *rbm , u8 state , u32 *minext ,
       struct gfs2_blkreserv *rs , bool nowrap );

slay, that's the signature ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • rbm β€” value/result starting position and final position (it's literally both, iconic)
  • state β€” the state which we want to find (no cap, that's the vibe check)
  • minext β€” pointer to the requested extent length β€” and bestie, this gets updated to be the actual reservation size (the plot twist 😭)
  • rs β€” our own reservation (NULL to skip checking for reservations) (iykyk, just pass NULL if you don't care)
  • nowrap β€” stop looking at the end of the rgrp, rather than wrapping around until we've reached the starting point (no wraparound era, periodt πŸ’…)

πŸŽ€ DESCRIPTION πŸŽ€

okay so the side effects are literally:

  • if looking for free blocks, we set GBF_FULL on each bitmap which has no free blocks in it (marking them full, slay)
  • if looking for free blocks, we set rd_extfail_pt on each rgrp which has come up short on a free block search (the way it just tracks the failures, not me 😭)

🌈 RETURN 🌈

returns 0 on success, or -ENOSPC if there is no block of the requested state (no block, no vibes, we hate to see it πŸ’€)


🧚 SEE ALSO 🧚

bestie, you gotta check out the Kernel file ./fs/gfs2/rgrp.c (the source of truth, fr fr ✨) and then all these functions: 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), 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) (obsessed with this list, it's giving main character energy πŸ‘‘)


and that's the tea, bestie πŸ’… this page came from ./fs/gfs2 in October 2026 and it's all about gfs2_rbm_find(9) periodt ✨

πŸ“¦ where this page comes from