nilfs_sufile_trim_fs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– nilfs_sufile_trim_fs(9) πŸ’–

okay bestie, this is the nilfs_sufile_trim_fs(9) page from the Kernel API Manual, and it's literally the trim ioctl handle function. grab a snack πŸ“, we're doing this. ✨

πŸŽ€ NAME πŸŽ€

nilfs_sufile_trim_fs β€” trim ioctl handle function. periodt. πŸ’…

🌸 SYNOPSIS 🌸

int nilfs_sufile_trim_fs (struct inode *sufile , struct fstrim_range
       *range );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • sufile β€” inode of segment usage file. yes, that's the sufile bestie.
  • range β€” a fstrim_range structure. iconic struct moment.

✨ DESCRIPTION ✨

the fields in play are:

  • start β€” First Byte to trim.
  • len β€” number of Bytes to trim from start.
  • minlen β€” minimum extent length in Bytes.
the original page spells it Decription, and honestly? typo energy. but the facts are the facts:

nilfs_sufile_trim_fs goes through all segments containing bytes from start to start+len. start is rounded up to the next block boundary, and start+len is rounded down. for each clean segment, the blkdev_issue_discard function is invoked. slay. πŸ”₯

πŸ’œ RETURN πŸ’œ

0 on success, or a negative error code on failure. no cap. 😭

🌈 SEE ALSO 🌈

Kernel file ./fs/nilfs2/sufile.c, plus these besties:


mwah πŸ’‹ β€” signing off from the source/version spot ./fs/nilfs2, dated October 2026, on the nilfs_sufile_trim_fs(9) page. byeeee 🫢

πŸ“¦ where this page comes from