try_to_extend_reservation(9)
π try_to_extend_reservation(9) π
okay so we're in the Kernel API Manual today bestie, and this page is literally about giving your ext2 reservation window a little glow-up so it can hold more blocks. no cap. π¦
β¨ NAME β¨
try_to_extend_reservation β
...and that's it. that's the whole name section. it's giving mysterious. the original page leaves the description blank so we're not gonna invent one, we're just gonna sit here and respect the silence π
πΈ SYNOPSIS πΈ
void try_to_extend_reservation (struct ext2_reserve_window_node *my_rsv
, struct super_block *sb , int size );
π ARGUMENTS π
my_rsvβ the given reservation window. this is the main character of the whole function, the window we're tryna make bigger πsbβ the super block. iconic as always.sizeβ the delta to extend by. aka how much bigger we're asking for, not the final size, the change. iykyk.
π DESCRIPTION π
so the goal here? attempt to expand the reservation window large enough to have the required number of free blocks. that's the whole vibe. β
here's the lore: since ext2_try_to_allocate will always allocate blocks within the reservation window range, if the window size is too small, multiple blocks allocation has to stop at the end of the reservation window. like, it literally cannot go past the edge, no matter how much it wants to. π
to make this more efficient β given the total number of blocks needed and the current size of the window β we try to expand the reservation window size if necessary, on a best-effort basis, before ext2_new_blocks tries to allocate blocks. best-effort is the key phrase here bestie, nobody's promising anything, we're just doing our little best π«Ά
no cap: this is a best-effort expansion. it's a pre-allocation nicety, not a guarantee. read the two paragraphs above again if you're about to assume more than that.
π§ SEE ALSO π§
all of these live in the kernel file ./fs/ext2/balloc.c and honestly the whole friend group showed up:
__rsv_window_dump(9)goal_in_my_reservation(9)search_reserve_window(9)rsv_window_remove(9)ext2_init_block_alloc_info(9)ext2_discard_reservation(9)ext2_free_blocks(9)bitmap_search_next_usable_block(9)find_next_usable_block(9)ext2_try_to_allocate(9)find_next_reservable_window(9)alloc_new_reservation(9)ext2_try_to_allocate_with_rsv(9)ext2_has_free_blocks(9)ext2_bg_has_super(9)ext2_bg_num_gdb(9)
and that's the whole page, bestie π this one came from ./fs/ext2 and it's dated October 2026 β go off, calendar. mwah, see you in the next man page πππΈ
π¦ 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