nilfs_sufile_trim_fs(9)
π 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β afstrim_rangestructure. iconic struct moment.
β¨ DESCRIPTION β¨
the fields in play are:
startβ First Byte to trim.lenβ number of Bytes to trim fromstart.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:
struct nilfs_sufile_info(9)nilfs_sufile_segment_usage_offset(9)nilfs_sufile_get_ncleansegs(9)nilfs_sufile_updatev(9)nilfs_sufile_set_alloc_range(9)nilfs_sufile_alloc(9)nilfs_sufile_mark_dirty(9)nilfs_sufile_set_segment_usage(9)nilfs_sufile_get_stat(9)nilfs_sufile_truncate_range(9)nilfs_sufile_resize(9)nilfs_sufile_get_suinfo(9)nilfs_sufile_set_suinfo(9)nilfs_sufile_read(9)
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
- 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