ext4_trim_fs(9)
π NAME π
okay so bestie, this is the ext4_trim_fs(9) page from the Kernel API Manual β¨ and it is literally the trim ioctl handle function. That's the whole name, no cap π
.
β¨ SYNOPSIS β¨
int ext4_trim_fs (struct super_block *sb , struct fstrim_range *range );
πΈ ARGUMENTS πΈ
sbβ superblock for filesystem π«Άrangeβfstrim_rangestructure π
π¦ DESCRIPTION π¦
okay so here's the tea, the fields in play are giving very specific:
startβ First Byte to trim πlenβ number of Bytes to trim fromstartπminlenβ minimum extent length in Bytes π
so ext4_trim_fs goes through all allocation groups containing Bytes from start to start+len. for each such a group, ext4_trim_all_free function is invoked to trim all free space. periodt π
β¨
π SEE ALSO π
- Kernel file
./fs/ext4/mballoc.cπ ext4_mb_clear_bb(9)π₯ext4_free_blocks(9)π¦ext4_group_add_blocks(9)πΈext4_trim_extent(9)βext4_trim_all_free(9)π§
and that's the page, bestie π source/version: ./fs/ext4; date: October 2026; it's the ext4_trim_fs(9) manual, mwah ππ«Ά
π¦ 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