gfs2_alloc_size(9)
๐ gfs2_alloc_size(9) โ from the Kernel API Manual, bestie โจ
okay so picture this: you're deep in the GFS2 filesystem, right, and you need to know how big your next allocation can possibly be. That's literally this function. It's giving "main character of the block allocator" energy ๐
๐ธ NAME ๐ธ
gfs2_alloc_size โ compute the maximum allocation size ๐
โจ SYNOPSIS โจ
u64 gfs2_alloc_size(struct inode *inode, struct metapath *mp, u64 size);
๐ ARGUMENTS ๐
inodeโ the inode, the whole reason we're here ๐ซถmpโ the metapath (iykyk)sizeโ the requested size, measured in blocks ๐งฎ
๐ฆ DESCRIPTION ๐ฆ
So the actual job? Compute the maximum size of the next allocation at mp. That's it. That's the whole vibe. Lowkey elegant, ngl โจ
โญ RETURN โญ
The size in blocks ๐ฅ
๐ SEE ALSO ๐
Kernel file ./fs/gfs2/bmap.c, plus the whole friend group ๐
:
gfs2_unstuffer_folio(9)gfs2_unstuff_dinode(9)find_metapath(9)metaptr1(9)metapointer(9)lookup_metapath(9)fillup_metapath(9)gfs2_extent_length(9)gfs2_hole_size(9)__gfs2_iomap_alloc(9)__gfs2_iomap_get(9)gfs2_block_map(9)gfs2_journaled_truncate(9)sweep_bh_for_rgrps(9)find_nonnull_ptr(9)punch_hole(9)do_shrink(9)do_grow(9)gfs2_setattr_size(9)gfs2_free_journal_extents(9)gfs2_add_jextent(9)gfs2_map_journal_extents(9)gfs2_write_alloc_required(9)
and that's the page, bestie ๐ it lives in ./fs/gfs2, the version vibes are dated October 2026, and the whole thing answers to the name gfs2_alloc_size(9). slay, go read some kernel source ๐
๐ฆ 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