ext4_trim_fs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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_range structure πŸ’–

πŸ¦‹ 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 from start πŸŽ€
  • 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 πŸ’œ


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