nilfs_sufile...egment_usage(9)
π nilfs_sufile_set_segment_usage(9) β the kernel API manual, bestie edition π
Okay so real talk, we're in the Kernel API Manual, section 9, and today's main character is nilfs_sufile_set_segment_usage. The vibe? You're literally just setting the usage of a segment. That's it. That's the whole function. Slay. β¨
π¦ NAME π¦
nilfs_sufile_set_segment_usage β set usage of a segment π
πΈ SYNOPSIS πΈ
int nilfs_sufile_set_segment_usage (struct inode *sufile , __u64 segnum
, unsigned long nblocks , time64_t modtime );
Not me putting the whole signature in a code block so you can copy it exactly, no cap. π«Ά
β ARGUMENTS β
sufileβ inode of segment usage file. yeah, the inode. the segment usage file's whole identity. πsegnumβ segment number. which segment we're talking about, bestie. π’nblocksβ number of live blocks in the segment. live blocks!! not dead ones, we don't do those here. π₯modtimeβ modification time (option). the little optional timestamp moment. β°
π RETURN π
0 on success, or a negative error code on failure. so either it ate and left no crumbs, or it's giving negative error code π
π§ SEE ALSO π§
Kernel file ./fs/nilfs2/sufile.c β the source of truth, iykyk π
And the whole friend group, fr fr:
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_get_stat(9)nilfs_sufile_truncate_range(9)nilfs_sufile_resize(9)nilfs_sufile_get_suinfo(9)nilfs_sufile_set_suinfo(9)nilfs_sufile_trim_fs(9)nilfs_sufile_read(9)
lowkey that's the whole page, bestie. go forth and set some segment usage. π β¨
Sign-off time π this one's from ./fs/nilfs2, dated October 2026, and it's page nilfs_sufile...egment_usage(9) of the Kernel API Manual β yes the header got a little truncated, she's fine, she's iconic, we don't judge. bye bestie, drink some water ππ¦π
π¦ 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