ext4_get_group_desc(9)
β¨ ext4_get_group_desc(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a kernel-API page, section 9, and it's all about grabbing a group descriptor off the disk. it's giving "short but mighty" and honestly? iconic.
π NAME π
ext4_get_group_desc β load group descriptor from disk
like literally, that's the whole job. load. group descriptor. from. disk. periodt. π
π¦ SYNOPSIS π¦
struct ext4_group_desc * ext4_get_group_desc (struct super_block *sb ,
ext4_group_t block_group , struct buffer_head **bh );
not me dropping the full signature so you can copy it exactly π«Ά β it returns a struct ext4_group_desc *, and it takes three things. let's get into them π
πΈ ARGUMENTS πΈ
sbβ the super block π« yeah, that one. your super block.block_groupβ the given block group. that's the group you're asking about, no cap.bhβ pointer to the buffer head to store the block group descriptor π so it's a pointer-to-a-pointer situation, and that's where the descriptor's buffer head ends up living.
ngl,bhis the sneaky one β it's astruct buffer_head **, so you're handing over the address of your pointer. do not hand it a plain pointer, bestie, i'm begging π
π SEE ALSO π
this is the friend group of related functions, and they all ate fr fr π₯
Kernel file ./fs/ext4/balloc.c β that's the home base for this one, go say hi π
ext4_read_block_bitmap_nowait(9)ext4_has_free_clusters(9)ext4_should_retry_alloc(9)ext4_count_free_clusters(9)ext4_bg_has_super(9)ext4_bg_num_gdb(9)ext4_inode_to_goal_block(9)
and that's the whole page!! short, sweet, and extremely useful π iykyk.
so yeah β this whole thing lives under ./fs/ext4, and it's dated October 2026, version vibe and all, with ext4_get_group_desc(9) stamped right on the footer like a lil signature π mwah, go read a group descriptor, main character π§ββοΈβ¨
π¦ 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